Using action "Invoke Web Service", i'm returned a JSON output (works fine..)
In the end, the data is to be inserted in a SQL database, so using action "Convert JSON to Custom Object", i'm turning the JSON into a custom object.
My data now looks like this:
"name": "Donald Duck",
.... rest of data is cut off and not included in this post
On my way towards the SQL insert, i am using action "Set Variable" = '%JsonAsCustomObject.name%' (which works fine, the variable is set correctly to "Donald Duck")
Using action "Set Variable" = '%JsonAsCustomObject.email%' will returns this error: "Variable 'JsonAsCustomObject' doesn't have a property 'email'."
How do i get to the point where i can make PAD understand to pick up the value "NULL" or "BLANK" when my Custom Object does not hold a value ?
I tried it with the latest version, and looks like it picks the blank value successfully.
Could you check with the latest one?
I am also hitting this roadblock. Was there a solution or a proper way to address this that you found @ALPetersen ?
Also the message stating that a variable "doesn't have a property" is not correct in my case. It has the property but the property is null. What I try to do is to catch these cases with an IF (empty) and set it to 0 or something but same result 😕
I am not posting anything sensitive here. Just info on a gas station and current prices 🙂
To solve this I used a "Replace text" action before "Convert JSON to custom object" action, where replace all null to empty text, see below the actions and configuration used:
I hope the solution works for you.
Thanks @CesarRamirez . This is indeed a solution to this task. Hopefully the Convert JSON to custom object action will be updated to handle null values better in future updates 🙂
Check out how to claim yours today!
Check out new user group experience and if you are a leader please create your group
Test your skills now with the Cloud Skill Challenge.