cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Ignore parse JSON

I have a Parse JSON action for getting data from MS forms (attachment information), which is then parsed as a link. But the attachment image is optional and when image is not attached I get a null error. I've tried the solution to add "null" to the code but it does not work. Hope someone can give a solution to ignore the Parse JSON code when there is no/null data? 

 

dashiofhdfsdufs_0-1654250483535.png

 

{
    "type": "array",
    "items": {
        "type": "object",
        "properties": {
            "name": {
                "type": [ "string",
                "null"]
            },
            "link": {
                "type": [ "string",
                "null"]
            },
            "id": {
                "type": [ "string",
                "null"]
            },
            "type": {},
            "size": {
                "type": [ "string",
                "null"]
            },
            "referenceId": {
                "type": [ "string",
                "null"]
            },
            "driveId": {
                "type": [ "string",
                "null"]
            },
            "status": {
                "type": [ "string",
                "null"]
            },
            "uploadSessionUrl": {}
        },
        "required": []
    }
}

 

1 ACCEPTED SOLUTION

Accepted Solutions

I've made another solution. Added a condition that checks if the MS form question has been filled. If so it starts the JSON, otherwise the same steps are done without the JSON parse step. 

dashiofhdfsdufs_0-1655132967957.png

 

View solution in original post

2 REPLIES 2
v-jefferni
Community Support
Community Support

Hi @dashiofhdfsdufs ,

 

Could you please share more details about your scenario? What are the actions above the Parse JSON operation? Is it possible for you to use a Condition control to first check whether there is no attachment in that field?

 

Best regards, 

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

I've made another solution. Added a condition that checks if the MS form question has been filled. If so it starts the JSON, otherwise the same steps are done without the JSON parse step. 

dashiofhdfsdufs_0-1655132967957.png

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (5,247)