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 / Combine multiple IF st...
Power Automate
Unanswered

Combine multiple IF statements

(0) ShareShare
ReportReport
Posted on by 155

First of all i tried to solve my problem with other threads but i had no success.

Hopefully someone may help me this the follwoing problem:

 

My Sharepoint columns are true/false. Only my last if statement is based on a TEXT column (colum is called "SonstigesThema/Value".

 

For each condition I want to send Mails to different recipient and integrate different mail text.

So i need two almost identical if-statements.

 

One code for the mail text:

 

if(triggerBody()?['Umweltauswirkung2'], 'Umweltauswirkung'),

if(triggerBody()?['Qualit_x00e4_t2'], 'Qualität'),

if(triggerBody()?['Energieeffizienz2'], 'Energieeffizienz'),

if(triggerBody()?['Wirtschaftlichkeit2'], 'Wirtschaftlichkeit'),

if(triggerBody()?['Arbeitssicherheit2'], 'Arbeitsssicherheit'), '')))

 

 

and a code for email adresse

 

 

if(triggerBody()?['Umweltauswirkung2'], 'email1'),

if(triggerBody()?['Qualit_x00e4_t2'], 'email2'),

if(triggerBody()?['Energieeffizienz2'], 'email3'),

if(triggerBody()?['Wirtschaftlichkeit2'], 'email4'),

if(triggerBody()?['Arbeitssicherheit2'], 'email5'), '')))

 

 

I dont get the right code. 

 

I just tried to illustrate my code in the sending-mail-formular.

I know I have to put my code in a function 😉

 

Second question:

Unfortunatly I dont have a basic mode anymore to switch. Where is it gone?

 

Thank you guys for helping

 

1.png

 

2.png

 

Categories:
I have the same question (0)
  • Ed Gonzales Profile Picture
    4,531 Most Valuable Professional on at

    @franky0711 

    Hi there.  Have you already considered using the Switch action?  It's great for conditions that don't have a binary T/F Y/N response.

     

    Keep us posted.

    -Ed

     

    If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

  • franky0711 Profile Picture
    155 on at

    Hi @edgonzales  thank you for helping me.  First of all I need to check True/False - see my screenshot in my first post.

     

    Is this possible trying with a SWITCH?

    Does SWITCH also check TRUE/FALSE?

     

    12.png

     

    Next problem is: I need an case-dependent function for my email text.

     

    If (value;true;TEXT1) see in my first post.

  • Amanthaper Profile Picture
    441 on at

    Hi @franky0711 

    Please help me understand further. Looking at your first example:

    Amanthaper_0-1602741887208.png

    Are you looking to evaluate the "Umweltauswirkung2" triggerbody() attribute and if it's value is "Umweltauswirkung2" then you want to set (a variable maybe) or change it to "Umweltauswirkung"?

     

  • franky0711 Profile Picture
    155 on at

    Umweltauswirkung2 is my SP-column.

    and yepp I need only a STRING if condition sis true.

     

    In my different emails I need to add different text / strings like (Umweltauswirkung, Energieeffizienz, Wirtschaftlichkeit, Qualität and Arbeitssicherheit).

     

  • Verified answer
    v-litu-msft Profile Picture
    on at

    Hi @franky0711,

     

    If() function should have three parameters:

    if(<expression>, <valueIfTrue>, <valueIfFalse>)

    If you want to integrate different mail text based on trigger output, I think you should add equals() function into your expression to check specified field if met you want, and then display text, for example:

    if(equals(triggerBody()?['Umweltauswirkung2'], 'Umweltauswirkung'),'Text1','Text2')

    This is based on the code after your expression has been modified by me:

     

    if(triggerBody()?['Umweltauswirkung2'], 'email1',if(triggerBody()?['Qualit_x00e4_t2'], 'email2',if(triggerBody()?['Energieeffizienz2'], 'email3',if(triggerBody()?['Wirtschaftlichkeit2'], 'email4',if(triggerBody()?['Arbeitssicherheit2'], 'email5', '')))))

     

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

     

  • franky0711 Profile Picture
    155 on at

    Thank you so much guys 🙂 

     

    These statements are wokring now.

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard