cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Flow workflow if and Empty expression

Hi All,

I'm building a flow workflow that pushes answers from a Microsoft form into a sharepoint list (based on the template)

It works well when pushing answers straighforward into sharepoint list.

But, as I have some answers that can be null in the form, I would like to push a value in case of null answer ("Not answered")

I'm trying to use the expressions tab in flow.

So, on the sharepoint part of the workflow, where I link answers to fields of sharepoint list, i'm trying to put this:

 

if(empty(body('Get_response_details')?['r0bd8b43a180c454da240a1e81d15d2ad'], "Not Answered",body('Get_response_details')?['r0bd8b43a180c454da240a1e81d15d2ad'])
 
For me, "if" is waiting for true or false, the empty(body('Get_response_details')?['r0bd8b43a180c454da240a1e81d15d2ad']
return True, so the "not answered" value should be used, else, it gets the value of body('Get_response_details')?['r0bd8b43a180c454da240a1e81d15d2ad']
 
But I cannot validate the query because of "invalid query" error. Any ideas ?
Thanks for your help.
1 REPLY 1
Highlighted
New Member

Re: Flow workflow if and Empty expression

got it, it's all about double quotes...

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (6,019)