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

JSON Parse failing on optional attachement Form

Hi everyone,

 

Few days ago, I submitted a topic about how to populate a Word Template with different images coming from a Form (here is the topic: https://powerusers.microsoft.com/t5/Building-Flows/Populate-Word-Template-with-Multiple-Images-submi... ).

That issue got solved, but now, a JSON Parse step is failing if there's no file uploaded at some of the questions (because they were optional on the Form).

Is there a way that I can let the question without the 'Required' mark, so people are able to not upload an image, and JSON Parse doesn't fail?

 

Flow.PNG

 

Details: 

- The form has 3 questions where submitters can upload 1 image on each (optional).

- The flow has 3 JSON Parse that will get those image to let them able to use in a Word Template.

- The flow fails if one of the 3 questions doesn't have a file uploaded.

 

Thank you so much for your help.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

 

Hi @ChrisCollao ,

 

Please check the following configuration, you could use Condition to check if the attachment is empty:

146.PNG

 

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

6 REPLIES 6
Community Support
Community Support

 

Hi @ChrisCollao ,

 

Please check the following configuration, you could use Condition to check if the attachment is empty:

146.PNG

 

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

Hi @v-bacao-msft , thanks for the response.

 

One question with this solution: ¿Is it possible to leave the "If No" section empty and keep up with the Flow with next steps apart?

 

Thanks!

 

Hi @ChrisCollao ,

 

Yes, you only need to configure all actions in the If yes branch.

 

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 

 

Finally created the flow with the If conditions, but got an error at the step "Populate Word Template". 

 

Flow2.PNG

 

If the word step waits an image as input, but it doesn't exist, is there anyway to solve it? (a better way than creating 'n' word templates to set them on the multiple possibilities).

 

Thank you so much.

 

Hi @ChrisCollao ,

 

You could append the file content to an array and get the elements in the array by index.

Then you can configure each item in the control corresponding to Work template.

151.PNG152.PNG153.PNG

 

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.

@v-bacao-msft thanks for your help.

 

I will accept the first post as a solution for the first issue, but I think that I may open a new one to the Word's issue. Maybe I didn't explained clearly enough.

 

Thanks a lot.

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (24,644)