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

Error when creating new SharePoint list item using response from Microsoft Forms

I have a form set up that includes two fields where the user can input an email address. One of the fields is required, the other isn’t. The flow is set up where once a user submits their response, the response is used to create a new item in a SharePoint list. The flow works when both fields are filled out. However, when the field that isn’t required is left blank, that’s where it runs into an issue. It gives me an error that the specific user  could not be found. I’m guessing this means that the blank “” user could not be found in our organization when trying to create a new list item. Is there a way around this? If a user leaves the unrequired field in the form blank, I want it to be left empty in the list column.

 

I know one way to go around the error is to set the column for that unrequited field as a single line of text instead of people or group in the SharePoint list. However, I don’t want to do that because I want the person’s profile to show in the SharePoint list.

1 ACCEPTED SOLUTION

Accepted Solutions
henkenTech
Resolver II
Resolver II

Hey there,

 

you could try it with this expression for the SP field (untested): 

 

if(greater(length(EMAILFIELD), 0), EMAILFIELD, null)

 

replace EMAILFIELD with the dynamic reference to the feld with the MS Forms response.

 

Alternatively, leave the field blank in your create action and create a conditions that if length(EMAILFIELD) is greater than 0 -> Update item and set the value of the field to the email field from Forms.

 

Hope this help,

 

Max 

View solution in original post

2 REPLIES 2
henkenTech
Resolver II
Resolver II

Hey there,

 

you could try it with this expression for the SP field (untested): 

 

if(greater(length(EMAILFIELD), 0), EMAILFIELD, null)

 

replace EMAILFIELD with the dynamic reference to the feld with the MS Forms response.

 

Alternatively, leave the field blank in your create action and create a conditions that if length(EMAILFIELD) is greater than 0 -> Update item and set the value of the field to the email field from Forms.

 

Hope this help,

 

Max 

View solution in original post

Thanks for the help! The expression worked and now the flow runs.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,812)