In the past when I've had to parse JSON, or construct a schema, and I need to allow for "null", this has always worked for me in Power Automate:
{
"type": "object",
"properties": {
"accountId": {
"type": "string"
},
"industryTags": {
"type": [
"string",
"null"
]
}
}
}
This is also confirmed here: https://stackoverflow.com/a/56708378/3123109.
Now I'm trying to work on a child flow and need it to receive null values and it isn't working. The field doesn't show up in the parent child request:
If I change it to "type": "string", then it does show up. But then inevitably some data is sent over without industryTags and it fails.
So how do I allow for null values in this use case?
Are you passing the null as expression?
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogNo, I am just passing the value of the field from Dynamics 365. So if the field value is empty, it just passes it null.
Thanks for your quick reply. What's the error you getting? Make sure the child flow input is not mandatory.
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogThat is one thing I was trying to figure out how to do was not make it mandatory. How do you do that in the JSON scheme declaration?
I don't have the error in front of me anymore, but it was something along the lines of: "Was expecting a string/integer, but received 'Null'."
The JSON scheme declaration you described earlier is correct other than you haven't specified the null optional set for accountId. Believe this was a typo and you already taken care of it in your flow.
{
"type": "object",
"properties": {
"accountId": {
"type": "string"
},
"industryTags": {
"type": [
"string",
"null"
]
}
}
}
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blog
Where (or how) you use the "industryTags" in your child?
I try to reproduce by following parent and child flow. the result is if "industryTags" pass to child is null, then "industryTags" is not included in the http request (not sent over), if has some value then it will be included in request.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Learn from the top Power BI, Power Apps, Power Automate & Power Virtual Agents experts!
User | Count |
---|---|
32 | |
32 | |
22 | |
22 | |
19 |
User | Count |
---|---|
57 | |
56 | |
41 | |
37 | |
29 |