web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Nesed Or and And witin IF
Power Automate
Unanswered

Nesed Or and And witin IF

(0) ShareShare
ReportReport
Posted on by

Hey Everyone,

First time caller.  I've been stuck on this issue for hours, finally going to phone a friend for help.

 

I have a forms multiple choice pick-list that has two very similar choices.  Dog and Dogfood.  Dogfood can easily be identified though a contains 'dogfood' expression.  However 'Dog' returns user sections for both Dog and DogFood. 

 

Making it hard to work though 3 scenarios.

  1. if  only 'Dog' is selected
    1. Update Dog work item
  2. If only 'DogFood' is selected
    1. Update 'DogFood' work item
  3. 'Dog' and 'Dogfood' are selected
    1. Update both 'Dog' and 'Dogfood' work items

 

I've had a pass at writing an expression to only add updates to the correct work items, but I can't figure out the syntax to send the right updates to the right work items. 

 
if(

    or(

        and(

            contains(outputs('Get_response_details')?['body/guid'], 'Dog'),

            contains(outputs('Get_response_details')?['body/guid'], 'Dogfood')),

        and(

                not(contains(outputs('Get_response_details')?['body/guid'], 'Dogfood')),        

            contains(outputs('Get_response_details')?['guid'], 'Dog'))),

'testtag', '')
Categories:
  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @FooBars 

     

    Instead of contains, can you use equals , this would be checking for exact match, something like below

     

    equals(outputs('Get_response_details')?['body/guid'],'Dog')

    This expression checks whether form response equals Dog 

     

    Hope this helps !

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 307 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 289

#3
Henil Profile Picture

Henil 127

Last 30 days Overall leaderboard