I'm wanting to pass json format file into a CDT and ultimately into data store using the Write to Datastore Smart Service.
What's the function I need to write as per below so that I can make this work ? Can't work out how to get from json into Dictionary or List format which seems to be required ?
Have you tried experimenting with a!fromjson()?
Thanks, exactly what I needed.
Another query ... what am I doing wrong. When writing to the data store the records are not being split into separate rows but joined together in a single cell ? When using the Write to Datastore Entity / or do I need to use the Write to Multiple Data Store Entry ?
You never really specified what the format/structure of your original JSON string is. Basically you need to make sure that when you pass such string into a!fromJson, it returns an array of dictionary (as opposed to, for example, a flat array of strings or something).
For troubleshooting / testing you should try this in a blank Expression Rule editor and see what the result is. Additionally you might try declaring a PV of your CDT type "iddcdt" (also multiple), and run the a!fromJson in a script task, saving the result into the PV, prior to the WTDS node.
Discussion posts and replies are publicly visible
© 2019 Appian. All rights reserved.