Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Copilot Studio - General
Answered

Passing variables chosen in adaptive cards from Bot Framework Composer to PVA + herocard styling

(0) ShareShare
ReportReport
Posted on by

Hi again everyone, 

 

I am trying to pass a variable from Bot Framework Composer back to PVA, I have an adaptive card that shows a list of options for a user, when they pick one I want to be able to send that answer back to PVA without showing it as a message in the chat. Currently in bot responses I just have: 

 
- SWITCH: ${day}
- CASE: ${0}
-${conversation.day_choice}
- CASE: ${1}
-${conversation.day_choice}
- CASE: ${2}
-${conversation.day_choice}
- DEFAULT:
 
But that just returns 'numbers' based on the case-number in the response so it will just say '2' in the chat if the user chose the second option. 
 
I want to pass the choice as a string to PVA, then let PVA use that choice to continue down into the decision tree. Any ideas on how do that? I could find very few examples on this on the internet, it may be a little niche... 
 
I found: https://powerusers.microsoft.com/t5/General/how-to-get-user-value-back-to-PVA-from-Bot-Framework-Composer/td-p/1188409, but that didn't quite answer my question in a way that I could get to work. 
 
So tl;dr: user picks an option from adaptive card, save option as a string and give that back as a variable to PVA, use this variable to determine the next path. 
 
Additionally, my vertical list which I pinched from https://docs.microsoft.com/en-us/power-virtual-agents/advanced-bot-framework-composer-example2 obscures some of the text if the options are too long, any workarounds around this? 
Categories:
  • Verified answer
    Monkeyman Profile Picture
    325 on at
    Re: Passing variables chosen in adaptive cards from Bot Framework Composer to PVA + herocard styling

    Hey

     

    you need to go to the parent topic and look at the dialog.result scope. 

    in there you can create output variables. 

    Check this post’s solution for more info - https://powerusers.microsoft.com/t5/Bot-Extensibility/Pass-variable-from-Bot-Framework-back-to-PVA/m-p/1386788#M70

     

    Please mark this topic as solved if I have helped. 

     

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Copilot Studio - General

#1
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 23

#2
Pablo Roldan Profile Picture

Pablo Roldan 16

#3
stampcoin Profile Picture

stampcoin 10

Overall leaderboard