Skip to main content
June 12, 2025
Question

Data Output error

  • June 12, 2025
  • 17 replies
  • 0 views

Getting error in the script task. I'm trying to pass the below jsonPV in PM.I want to store the id values in DB as separate row


    17 replies

    sarathkumr268295
    June 12, 2025

    As the error message suggests, the output does not seem to be in JSON format. It seems to be in map type.

    stefanhelzle0001
    June 12, 2025

    That jsonPV is not JSON. Keep in mind that the way Appian displays maps and dictionaries looks almost like JSON, but is not.

    meghar3159
    June 12, 2025

    The error occurs because a!fromJson() expects a Text input with valid JSON, but pv!jsonPv is already a Map (parsed structure). You don’t need to use a!fromJson() in this case. or you could change the type of your process variable to text .

    Hope this helps! Let me know if you’d like more assistance.

    sabat0002Author
    June 12, 2025

    Hi [mention:4741f7d40dab4867aec6f3066e3ed788:e9ed411860ed4f2ba0265705b8793d05] 

    I want to save the ID values in employeeIDs as a row in db for each emailaddress but now it is taking only value of first emailaddress. can you please help

    varuntejg243705
    June 12, 2025

    You need to iterate the IDs from Result PV, take an output, construct the record and save it Use PV as multiple, I can see the output_Requests is not multiple.

    You cannot add multiple IDs to a single employeeIDs column, if you are doing that.

    varuntejg243705
    June 12, 2025

    Hi [mention:85ca6a2722324ac4b08c9eda0b5e1851:e9ed411860ed4f2ba0265705b8793d05] ,

    You are trying to convert JsonPV which is of Map Type and not JSON Type.

    You can directly write the data without using a!fromJson() function. Check the mappings thoroughly and write it to other PV!

    davidj137213
    June 12, 2025

    YOu are trying to use a map as json..... YOu have to change the type to text or use tojson function....

    Anyway.. validate the json message you are working with

    harshas2775
    June 12, 2025

    Just remove the fromjson() from your expression and try!