cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
MathieuN
Level: Power Up

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
MathieuN
Level: Power Up

Re: Flow workflow if and Empty expression

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

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (2,548)