cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Antonioclk
Helper IV
Helper IV

Flow for saving Forms data to Sharepoint Lists fail when an item is not set

Hello, 

i have a simple flow which gets responses from a Microsoft Form with an attachment and then creates items in a Sharepoint list.

i do a json parse on the string and retrieve link of the file. I want to store the link in a sharepoint column.

 

When the attachment is present, the flow runs smoothly, but when there is no attachment, it fails.

 

my flow has this structure

  1. when a response is submitted
  2. apply to each
    1. get response details
    2. compose (retrieve the data related to the attachment)
    3. parse JSON (it parses the compose output)
    4. Create Item (here i have a field where i add the "link" value parsed by the json, but when it is empty, it fails)

how to fix? i could add a condition for checking if the link value is empty but i would still have to put something inside the related field in the create item.

 

how to fix this?
Thank you so much

1 ACCEPTED SOLUTION

Accepted Solutions
ashyriverflow
Resolver II
Resolver II

Hi @Antonioclk I guess the field where you put the link is not a required field?

The condition can go like this:

if "link" is empty:

Yes - Create Item step with the field being blank (as is)

No - Create Item step with the field being filled with the "link".

 

 

View solution in original post

4 REPLIES 4
JB0007
Helper V
Helper V

Hi @Antonioclk ,

 

You can try setting a condition to look for if the form has an attachment.

If the form has an attachment to use to code you currently have and if it not to only save the data.

the point is that the Create Item where i set the link of the attachment is out of the condition, so i still have to put something in it. what should i put if there is no file?

ashyriverflow
Resolver II
Resolver II

Hi @Antonioclk I guess the field where you put the link is not a required field?

The condition can go like this:

if "link" is empty:

Yes - Create Item step with the field being blank (as is)

No - Create Item step with the field being filled with the "link".

 

 

Antonioclk
Helper IV
Helper IV

thanks, it worked!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (4,879)