cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
simms7400
Post Prodigy
Post Prodigy

Can you use if statments in the "Details" section of an Approval?

Hi Folks -

 

Question for you all.  I have an approval workflow setup that is working as expected. Now that it is live, there is one scenario I need to check for which will dictate the content of "Details" message.  Rather than setup a whole new flow to accommodate the exception, can I use an expression in the Details section?

 

What I mean is, I need to check the value of "PartnershipID" and if it's blank/null, use one message and if it's not blank, display another message.  Is that possible with an IF statement?

 

Screen shot below - thank you!

PowerAutomate.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

 

Hi @simms7400 ,

 

Please try the following expression:

84.PNG

if(empty(outputs('Compose')),'other message',outputs('Compose'))

For more details about WDL function,  please check the online doc:

https://docs.microsoft.com/en-gb/azure/logic-apps/workflow-definition-language-functions-reference

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-bacao-msft
Community Support
Community Support

 

Hi @simms7400 ,

 

Please try the following expression:

84.PNG

if(empty(outputs('Compose')),'other message',outputs('Compose'))

For more details about WDL function,  please check the online doc:

https://docs.microsoft.com/en-gb/azure/logic-apps/workflow-definition-language-functions-reference

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Thank you!!! 

 

Everything is working, however the "empty" logic isn't.  When I force the "PartnershipID" to be empty, it still execute as if it were populated. ANy ideas?

I Figured it out I believe. It was recognizing at PartnershipID with a length of 1, which is odd. I will adjust and see if I can get it to work. 

 

Hi @simms7400 ,

 

The Empty() function is not suitable for directly judging whether the number type field is empty, you can use Compose to store it first, and then judge whether the output of Compose is empty. If you have any other questions related to Flow, just ask.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (3,826)