cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Annabelle
Frequent Visitor

Help with figuring out which line to remove from Parse Json. User did not upload an attachment to form and it caused a failure.

Capture - Flow.PNG

 

Here is my Parse json.  A user fills our form and can include an attachment.  It they do not it fails.  If they do it succeeds.

 

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

Accepted Solutions

hi @Annabelle  what you need to do is manage a condition if the field Fileupload is empty or not.

see

part1.PNG

 

so if is empty go true part but if contains a file you can use parse json to get the link and the use that file



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

View solution in original post

Hi @Annabelle 

 

Can you try this:

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

 

if that does not work try this:

{
    "properties": {
        "name": {
            "type": "string"
        },
        "link": {
            "type": "string"
        },
        "id": {
            "type": "string"
        },
        "type": {},
        "size": {
            "type": "integer"
        },
        "referenceId": {
            "type": "string"
        },
        "driveId": {
            "type": "string"
        },
        "status": {
            "type": "integer"
        },
        "uploadSessionUrl": {}
    }

}

Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





View solution in original post

4 REPLIES 4
Jcook
Super User III
Super User III

Hello,

Can you try:
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"link": {
"type": "string"
},
"id": {
"type": "string"
},
"type": {},
"size": {
"type": "integer"
},
"referenceId": {
"type": "string"
},
"driveId": {
"type": "string"
},
"status": {
"type": "integer"
},
"uploadSessionUrl": {}
}
}
}

Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





Annabelle
Frequent Visitor

Flow still fails at same step.

hi @Annabelle  what you need to do is manage a condition if the field Fileupload is empty or not.

see

part1.PNG

 

so if is empty go true part but if contains a file you can use parse json to get the link and the use that file



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

View solution in original post

Hi @Annabelle 

 

Can you try this:

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

 

if that does not work try this:

{
    "properties": {
        "name": {
            "type": "string"
        },
        "link": {
            "type": "string"
        },
        "id": {
            "type": "string"
        },
        "type": {},
        "size": {
            "type": "integer"
        },
        "referenceId": {
            "type": "string"
        },
        "driveId": {
            "type": "string"
        },
        "status": {
            "type": "integer"
        },
        "uploadSessionUrl": {}
    }

}

Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





View solution in original post

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,363)