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
Discussion posts and replies are publicly visible
As the error message suggests, the output does not seem to be in JSON format. It seems to be in map type.
That jsonPV is not JSON. Keep in mind that the way Appian displays maps and dictionaries looks almost like JSON, but is not.
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.
a!fromJson()
pv!jsonPv
Hi ZAINAB ,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!
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
Hi Megha Ramnani 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
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.
Just remove the fromjson() from your expression and try!
Shall I create a separate DB for mail & employeeIds and then create record for it .After that , in process model i need to call this record to store the ID values..?
can you briefly explain what you want to achieve?Just a scenario is pretty enough!