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 / Save Response as Text ...
Copilot Studio
Unanswered

Save Response as Text from choice

(0) ShareShare
ReportReport
Posted on by 8

Hello,

I am facing an issue with Power Virtual Agents where I have a choice variable in my project, but the values are stored as choices, not as text. I need to convert the choice value to text for further processing, such as storing in a SharePoint list or passing to a Power Automate flow.

Could someone please help me with how I can convert a choice to text in Power Virtual Agents? Any suggestions or solutions would be greatly appreciated.

Thank you in advance for your assistance!

Best regards,

I have the same question (0)
  • Jameslew_MSFT Profile Picture
    on at

    Can you clarify what you're using to get a Choice type?  When I use a question node with Multiple Choice Options the output variable type is text.

  • postimerkk1 Profile Picture
    12 on at

    Hi,

    I am facing the same issue having converted a bot to the new PVA designed version. I have Multiple Choice Options and the variable of its output defaults to "choice" and I can't seem to change it. 

    Here is a separate question node I now added for an example:

    postimerkk1_0-1685023833536.png

    Can I determine the option directly to be interpreted as a string or convert with a function after?

  • postimerkk1 Profile Picture
    12 on at

    Hi,
    You may have this figured out already but for anyone else wondering about this. One workable option is to use the set variable action and use the Formula Text(Variable name), i.e. create a new variable and set its value to the Choice value as a string.

  • carlo0s_correa Profile Picture
    2 on at

    Hi!! You need to convert it like this Text(Topic.Var1)

     

    Regards!!

  • RobertMatthew1 Profile Picture
    32 on at

    I'm trying to do this but for a global variable, which previously worked in the classic build. Adding Text to the formula didn't seem to fix this issue.

  • HenryJammes Profile Picture
    on at

    @RobertMatthew1 wrote:

    I'm trying to do this but for a global variable, which previously worked in the classic build. Adding Text to the formula didn't seem to fix this issue.


    Can you share the screenshot of what isn't working?

    For a global variable, the formula should look like this: Text(Global.Var1)

  • RobertMatthew1 Profile Picture
    32 on at

    This is how the variables look within classic view: 

    RobertMatthew1_2-1686835261751.png

     

     

    The transferred entries looked like this: 

    RobertMatthew1_0-1686834654214.png

     

    I amended 'Option Set Value' to 'Text' in the affected fields: 

    RobertMatthew1_1-1686834783119.png

    This didn't restore the functionality of the process though. When I run this topic in the PVA bot, the question that provides the TopLevel global variable triggers instead, and the bot resets to that stage of the process.

     

    Edit: I also have image flows and an email topic w/o global variables that run fine within this bot.

  • postimerkk1 Profile Picture
    12 on at

    Haven't found a more convenient way myself as of now. Because the bot I converted was relatively small I instead used set variable to create a new global variable i.e. there would be a TopLevel (option) - confined to the topic and a separately set Global.TopLevel (string) variable in your specific case. Feel clumsy admittedly, so hopefully someone has a better solution for it.

  • RobertMatthew1 Profile Picture
    32 on at

    Is there a guide that covers setting a separate Global(string) variable after creating a (choice) variable? I've not had much success finding this, apologies.

  • HenryJammes Profile Picture
    on at

    @RobertMatthew1 wrote:

    Is there a guide that covers setting a separate Global(string) variable after creating a (choice) variable? I've not had much success finding this, apologies.


    Not explicitly for the cloud flow integration (where Power Automate expects a string), but topic and global variables are documented here, Work with chatbot variables - Power Virtual Agents | Microsoft Learn,  @RobertMatthew1 

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 255 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

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

#3
S-Venkadesh Profile Picture

S-Venkadesh 101 Moderator

Last 30 days Overall leaderboard