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 / Multiple IF expression...
Power Automate
Unanswered

Multiple IF expression to create Item name

(0) ShareShare
ReportReport
Posted on by 24

Hi, I need a little help with basic, I hope, expression in Power automate.

I have 3 columns in my Sharepoint list, named Column1, Column2 and Column3. What I would like is to auto populate a value for 1st column, based on the values in 2nd and 3rd column.

For example. If Column2 has value "Cat" and Column3 value "Dog" I would like to have in Columns1 value "CatDog"

or

If Column2 column has vale "Cat" and Column3 value "Fish" I would like to have in Column1 "CatFish"

I know it can be done with condition in Power automate steps, but I guess it is also possible with IF expression, I just need a sample of that multiple syntax. Can you help?

I

Categories:
I have the same question (0)
  • soundharya Profile Picture
    249 on at

    Soundharya_0-1643641979212.png

     

  • cnapan Profile Picture
    24 on at

    Well, thank you @Soundharya , but what if I have more combination in Column2 or Column3, except cat, dog and frish, there is also a pig, horse, elephant. Can I somehow a write

    if(Equals(triggerBody()['Column1'],'cat' and ['Column2']'), 'dog', 'catdog' '')
    or something similar but more complex to achieve my goal?
  • soundharya Profile Picture
    249 on at

    You can add compose action and below expression

    if(and(contains(variables('Name'), 'cat'),contains(variables('Name1'), 'fish')),'catfish',if(and(contains(variables('Name'), 'cat'),contains(variables('Name1'), 'dog')),'catdog',''))
    Soundharya_4-1643644134785.png

     


    Soundharya_2-1643644078852.png

     


  • cnapan Profile Picture
    24 on at

    Thank you, @Soundharya that would work, but can you show me all steps of the flow how this supposed to be constructed? I do not know, where to place the initialized variables. Thank you.

  • soundharya Profile Picture
    249 on at

    To show you example i have used variables, instead of variables you can use your columns or fields directly here

  • cnapan Profile Picture
    24 on at

    I did replace variables with column name, then getting syntax error 😞 Why?

    if(and(contains(['Animal1'], 'cat'),contains(['Animal2'], 'dog')),'catdog',if(and(contains(['Animal3'], 'fish'),contains(['Animal1'], 'cat')),'fishcat',''))

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

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard