Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Copilot Studio - Topic Creation & Management
Answered

multiple Conditions in single node?

(0) ShareShare
ReportReport
Posted on by 34

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?

  • David Penna Profile Picture
    David Penna 34 on at
    Re: multiple Conditions in single node?

    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!

  • Verified answer
    Pstork1 Profile Picture
    Pstork1 65,274 Most Valuable Professional on at
    Re: multiple Conditions in single node?

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

    image.png

  • David Penna Profile Picture
    David Penna 34 on at
    Re: multiple Conditions in single node?

    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.

  • Pstork1 Profile Picture
    Pstork1 65,274 Most Valuable Professional on at
    Re: multiple Conditions in single node?

    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")

     

  • Pstork1 Profile Picture
    Pstork1 65,274 Most Valuable Professional on at
    Re: multiple Conditions in single node?

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

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

Thomas Rice – Community Spotlight

We are honored to recognize Thomas Rice as our March 2025 Community…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community

Announcing Our 2025 Season 1 Super Users!

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

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,398 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,274 Most Valuable Professional

Leaderboard

Featured topics