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 / Copilot Studio / multiple Conditions in...
Copilot Studio
Answered

multiple Conditions in single node?

(0) ShareShare
ReportReport
Posted on by 42

Hi, I'm new to Power Virtual Agents, going through MS learning path, and the unit on Inputs Variables Conditions led me to this:

dp2022_0-1694277997135.png

 

Seems like a huge diagram, and a lot of items to create and configure, for only 4 choices.  Just wondering if there's a way to set up multiple conditions in one node, like:

 

Condition

{x} VarCountry (text)

is equal to

Canada, France, Spain, USA

Message

Lidia Holloway, Miriam Graham, Christie Cline, Lynne Robbins

 

Or some other way to have it select from multiple Message values based the input Variable value?

  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    Unfortunately, at this point PVA doesn't support a contains condition so there is no way to group multiple conditions.

  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    I had one other thought for a potential workaround.  You could use a PowerFX Switch() function to transform the original choice into grouped options in a new variable and then do the condition based on the value of the grouping.  For example if your choices were New York, Chicago, London, or Paris you could save a variable of NA if its New York or Chicago and EU if its London or Paris.  Then do the condition based on either NA or EU

    Switch(Text(Topic.Var3),"New York","NA","Chicago","NA","London","EU","Paris","EU","None")

     

  • David Penna Profile Picture
    42 on at

    Hi, thanks, I'd like to try that, though I don't know how I could put that in a step; as I said, very new to PVA.

  • Verified answer
    Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    YOu can add it to a Set Variable action using the unified Canvas.

    image.png

  • David Penna Profile Picture
    42 on at

    Hi again @Pstork1 , firstly thank you thank you thank you!  Took me a while to get back to this, and initially was a bit stymied because I'd been working in PVA installed in Teams, which did not have a Node option for Set Variable (here are the Teams' PVA node options):

    dp2022_0-1695159650032.png

     

    So I signed up for free trial in the web portal, and now seeing the Set Variable option, and To Value with Formula tab... AWESOME!

     

    So your Switch workaround would absolutely work if the multiple choice options could be grouped into a smaller number of choices, AND if separate conditional actions necessitated separate Nodes.

     

    In my case, I just needed to output a message contents based on the choice selection. Thanks to your suggestion, I was able to accomplish multiple conditional messages without using Condition Nodes at all - I Switched the choice Var1 with text strings into Var2

     

    Switch(Text(Topic.Var1),"France","france contact","Spain","spain contact","USA","usa contact","None")

     

    And output that in the Message

     

    The contact for {x}Var1 is {x}Var2.

     

     

    dp2022_2-1695162304375.png

     

    Thanks again!

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 > Copilot Studio

#1
11manish Profile Picture

11manish 121 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 102

#3
anirudhev Profile Picture

anirudhev 65

Last 30 days Overall leaderboard