web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / IF function when data ...
Power Automate
Unanswered

IF function when data is empty

(0) ShareShare
ReportReport
Posted on by 380

Hello!

I am working on a word populate flow and I am having issues trying to figure out a formula.

 

My word gets populated from PowerApps, where I gather a list of names and their signatures

Since the only way I was able to do this was having the list of signature images already saved in my SP documents (they get updated everytime I hit the button with the new signatures). This was working perfectly so far.

 

My problem is that not always i have the same amount of people signing, so my word gets populated with signatures not needed.

 

I was trying to write an IF formula

if(empty(triggerBody()['Doc_nomSupervisor']),null,outputs('firma_supervisor')?['body'])

What I tried to say is that if the Name of the Supervisor is empty (comes empty from PowerApps), don't show me any image. But, if there is a name, bring the image from SP List. 

Even though the formula is accepted from powerautomate, when I run it, it fails

Fernanda_0-1665578678202.png

Can you help me figure it out, please?

Thank you!!

 

Categories:
I have the same question (0)
  • Verified answer
    Sundeep_Malik Profile Picture
    6,484 on at

    Hey @Fernanda 

    If statement accepts three parameters.

    You have only given two.

    First parameter you have given null.

    Second parameter you have given, if null is true then you are giving the above expression.

    You will have to give a third expression, if it's not null. 

     

     

     

    Default if condition:

     

    If( expression, value expected, if value expected true then value, if value expected false then value)

  • Fernanda Profile Picture
    380 on at

    Hey Sundeep!

    thanks a lot for your help, I re-wrote the expression and it worked. I had to eliminate the null expression and create an empty image, because flow was expecting the image to populate the word.

    So, it turned up like this

    if(equals(empty(triggerBody()'Doc_nomSupervisor']),true),body('firma_vacia'),body('firma_supervisor'))

    thank you!!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard