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.

View solution in original post

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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (3,385)