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

I want to check if attachment is uploaded from MS Forms and then proceed to parse so that I can then add row to table using link.

I have a total o 3 attachments of which only one is mandatory. I want to check in the flow that who ever has attachment to then do the parse jason so that I can get the link to add to a row table :

parse.png

 

 

 

I am using this:

empty(body('Get_response_details')?['rf4878c9c994c45cca4d9ac4462d7f3b7'])

detail.png

 
 

I have tried but not getting what I need. Please help!

 

1 ACCEPTED SOLUTION

Accepted Solutions

 

Hi @vpatt91 ,

 

You could initialize a string variable to collect all links.

3.PNG

The configuration in the three conditions is similar. When judging that the attachment is empty, refer to the output of different Compose.

4.PNG

 

Please try again.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-bacao-msft
Community Support
Community Support

 

Hi @vpatt91 ,

 

Please try to add multiple branches to check if the attachment is empty separately.

134.PNG

Hope this helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-bacao-msft ,

 

I have tried and it fails.

 

See the only one that passes is the mandatory attachment but the other two are not mandatory. Once an attachment is added on the other two I want to get he link of these but it fails my flow.

 

Any other idea?

 

issue-.png

@v-bacao-msft  I have tried the following:

 

1. I compose  using:

length(body('Get_response_details')?['r8909a43f5caa4cf3b9d3adb7b590ed2a'])

2.  Add condition if yes then I Parse Jason (the reason I Parse is because I want to get the direct link of attachment) using:

{
    "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"
        ]
    }
}
 
At this point all works but error on #3.

3. Add row to table

To get the direct link to be added to the table but I get the error:

notsure.png

 

 

Hi @vpatt91 ,

 

You could initialize a string variable to collect all links.

3.PNG

The configuration in the three conditions is similar. When judging that the attachment is empty, refer to the output of different Compose.

4.PNG

 

Please try again.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (4,797)