Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Copilot Studio - Topic Creation & Management
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,

  • HenryJammes Profile Picture
    on at
    Re: Save Response as Text from choice

    @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 

  • RobertMatthew1 Profile Picture
    32 on at
    Re: Save Response as Text from choice

    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.

  • postimerkk1 Profile Picture
    12 on at
    Re: Save Response as Text from choice

    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
    Re: Save Response as Text from choice

    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.

  • HenryJammes Profile Picture
    on at
    Re: Save Response as Text from choice

    @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
    Re: Save Response as Text from choice

    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.

  • carlo0s_correa Profile Picture
    2 on at
    Re: Save Response as Text from choice

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

     

    Regards!!

  • postimerkk1 Profile Picture
    12 on at
    Re: Save Response as Text from choice

    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.

  • postimerkk1 Profile Picture
    12 on at
    Re: Save Response as Text from choice

    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?

  • Jameslew_MSFT Profile Picture
    on at
    Re: Save Response as Text from choice

    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.

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Featured topics