I am creating an internal scheduling tool that names internal participants. The flow is built off of Microsoft Forms and populates a sharepoint list. The column i am trying to populate is required to be a person or group because i am pulling the phone number from office 365 account using a seperate flow. The issue is that i do not always need to know the person in question so it is not a required question. When it is not filled out, the form fails because it does not recognize the person. I am trying to write a formula that leaves the entry blank when the answer is blank and therefore does not error out the form.
every formula i enter comes back invalid.
Hi @bigtuna26 ,
You need to use the equals() function in Expression to determine whether they are equal.
And you can use the empty() function directly to determine whether the field value is empty.
In addition, we need to use null or '' to indicate null.
Please consider using the following expression:
if(empty(body('Get_response_details')?['r74aff029d9cf4573a993c94352130c09']),null,body('Get_response_details')?['r74aff029d9cf4573a993c94352130c09'])
Please take a try.
Best Regards,
Hi
I guess the following expression represents the answer to the optional question asking for a person, right?
body('Get_response_details')?['r74aff029d9cf4573a993c94352130c09']
If so, I would try with coalesce() function, since Forms wil be probably return NULL value when no answer is given. Not 100% sure since I haven't tested this scenario yet
coalesce(body('Get_response_details')?['r74aff029d9cf4573a993c94352130c09'],'')
Hope this helps
Michael E. Gernaey
497
Super User 2025 Season 2
David_MA
436
Super User 2025 Season 2
Riyaz_riz11
244
Super User 2025 Season 2