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
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

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (100,707)