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 / Copilot Studio / Power Virtual Agent - ...
Copilot Studio
Unanswered

Power Virtual Agent - In condition

(0) ShareShare
ReportReport
Posted on by 1

How do we provide the list of values for the 'in' option in condition evaluation as below ?

 

rlpatrao_0-1695925418933.png

 

 Are there any formats ? 

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

    Hi @rlpatrao ,

     

    Assume we have two variables: "FindMe" and "ListofValues."

    1. "FindMe" variable is set to "red."

    2. "ListofValues" variable contains a list of values: ["red", "black"]

      nesrivastava_1-1697522242720.png

       

    Now, when we use the 'IN' operator in a condition, we're checking if the value of "FindMe" exists within the values of "ListofValues."

     

    nesrivastava_2-1697522341755.png

     

    In this case, it checks if "red" (from "FindMe") is found within the values "red" and "black" (from "ListofValues"). If it finds a match, it can trigger a specific action or response, such as saying it found the value.

    Following is the final output:

    nesrivastava_3-1697522437462.png

    Let me know if it works for you. Following is the YAML:

    kind: AdaptiveDialog
    beginDialog:
     kind: OnRecognizedIntent
     id: main
     intent:
     displayName: Untitled
     triggerQueries:
     - condition
    
     actions:
     - kind: SetVariable
     id: setVariable_8mcPfV
     variable: Topic.FindMe
     value: red
    
     - kind: SetVariable
     id: setVariable_5uqGYm
     variable: Topic.ListofValues
     value: [ "red", "black"]
    
     - kind: ConditionGroup
     id: conditionGroup_Rhfaim
     conditions:
     - id: conditionItem_iDb9LY
     condition: =Topic.FindMe in Topic.ListofValues
     actions:
     - kind: SendActivity
     id: sendActivity_P7Ttqe
     activity: Found {Topic.FindMe}
    
     elseActions:
     - kind: SendActivity
     id: sendActivity_cUclvW
     activity: Sorry, couldn't find it.

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

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 261 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 198 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 93 Moderator

Last 30 days Overall leaderboard