Skip to main content
Community site session details

Community site session details

Session Id : qo3ziv1pTwaI2mKIFveQ0b
Power Automate - Building Flows
Unanswered

Create a Logic function in a flow with 3 parameters

Like (0) ShareShare
ReportReport
Posted on 2 Dec 2022 08:17:09 by 559

Hi All,

I am building a flow to generate report and send mail to the respective managers with HTML content. I have three IF conditions to be satisficed only then it should be true. The condition I have written is:

 

if(equals(items('Apply_to_each_4')?['Project Type'],'Dev-Enh_Upgr-Impl'),equals(items('Apply_to_each_4')?['Project Method'],'Traditional Development'),
equals(items('Apply_to_each_4')?['Projectcontract'],'T & M'))

only if all the three conditions matches this condition must be true. If I use AND function I am getting a error stating :

Unable to process template language expressions in action 'Append_to_string_variable' inputs at line '0' and column '0': 'The template language function 'if' expects three parameter: the condition to test as the first parameter, the value to return if the condition is true as the second parameter, and the value to return if the condition is false as the third parameter. The function was invoked with '2' parameter(s).

Any help on this would be greatly appreciated.

  • Sri Profile Picture
    559 on 02 Dec 2022 at 10:08:11
    Re: Create a Logic function in a flow with 3 parameters

    Hi @v-dezhili-msft ,

     

    I am not using condition block instead applying all conditions inside append to string variable condition. I have attached a screenshot of the same. Here for one Project only one condition will be true and the other condition will be false. Whichever condition is true that respective column value it will take.

  • v-dezhili-msft Profile Picture
    Microsoft Employee on 02 Dec 2022 at 10:02:16
    Re: Create a Logic function in a flow with 3 parameters

    Hi @Uthhra ,

    You can use and() directly in condition action

    vdezhilimsft_0-1669975316685.png

    Best Regards,

    Dezhi

  • Sri Profile Picture
    559 on 02 Dec 2022 at 09:41:04
    Re: Create a Logic function in a flow with 3 parameters

    Hi @v-dezhili-msft ,

    When all 3 conditions matches and becomes true it takes the specific value for the column from Share Point and send an mail in a HTML format.

    For eg. If Project Method(Traditional) , Contract type(T&M) , Project type(Dev) matches it will take Schedule column value and if Contract type(FP) , Project type(Dev), Project Method(Traditional)  it will take commitment column value.

  • v-dezhili-msft Profile Picture
    Microsoft Employee on 02 Dec 2022 at 09:33:14
    Re: Create a Logic function in a flow with 3 parameters

    Hi @Uthhra 

     

    Are you trying to return something else when all three of your conditions are true?
    You can try to change the formula to:

     

    if(and(equals(items('Apply_to_each_4')?['Project Type'],'Dev-Enh_Upgr-Impl'),equals(items('Apply_to_each_4')?['Project Method'],'Traditional Development'),
    equals(items('Apply_to_each_4')?['Projectcontract'],'T & M')),'The value returned when true','the value returned when false')

     

    vdezhilimsft_0-1669973538516.png

     

    vdezhilimsft_1-1669973538517.png

     

    vdezhilimsft_2-1669973538518.png

     

    vdezhilimsft_3-1669973538519.png

    Best Regards,

    Dezhi

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading started