Skip to main content

Notifications

Calling Actions from Copilot Studio
Unanswered

the quotation mark is replaced with left/right double quotation mark

Posted on by 6

My issue is that my PVA returns the correct value of topics - sample value: 

{title: "Sharepoint", value: "Sharepoint"},{title: "Teams", value: "Teams"} - it is stored as string variable.

I would like to use it as a part of adaptive card (set in 'formula' mode): 

 choices: [                
       Topic.output
      ]

 

If the variable is displayed as message, the text is shown as {title: “Sharepoint”, value: “Sharepoint”},{title: “Teams”, value: “Teams”} - 

The quotation " mark (ascii 34) is replaced with left/right double quotation mark  - " !=“ or ” ;(

 

Any ideas how to solve it ?

  • Re: the quotation mark is replaced with left/right double quotation mark

    Hi @mazyd ,

     

    Please parse value form sample data.

    vbofengmsft_1-1710983214140.png

     

    Best Regards,

    Bof

     

  • mazyd Profile Picture
    mazyd 6 on at
    Re: the quotation mark is replaced with left/right double quotation mark

    Hi @v-bofeng-msft 

    I added the option for parsing and received the error as follows:

    2024-03-20_12-17-35.png

     

     

  • mazyd Profile Picture
    mazyd 6 on at
    Re: the quotation mark is replaced with left/right double quotation mark

    Hi @v-bofeng-msft ,

    I played with your solution, but the adaptive card is not shown:

    1. Set variable: 2024-03-20_11-49-53.png
    2. Add the variable to adaptive card: 2024-03-20_11-51-14.png 
      1. JSON: 
        {
          type: "AdaptiveCard",
          version: "1.5",
          body: [
            {
              type: "TextBlock",
              text: " Form title",
              size: "Large",
              wrap: true,
              weight: "Bolder",
              style: "heading"
            },
            {
              type: "Input.ChoiceSet",
              id: "TopicVal",
              label: "Please select: ",
              style: "filtered",
              isRequired: true,
              errorMessage: "This is a required input",
              placeholder: "Please choose",
              choices: Topic.Var2
            }
          ],
          actions: [
            {
              type: "Action.Submit",
              title: "Done"
            }
          ]
        }
    3. The bot does not display the card: 2024-03-20_11-57-27.png

     

     

    Any ideas ?

  • Re: the quotation mark is replaced with left/right double quotation mark

    Hi @mazyd  ,

     

    I suggest that you format the data into a standard JSON string in the flow before proceeding with the next steps in PVA.

     

    Best Regards,

    Bof

  • mazyd Profile Picture
    mazyd 6 on at
    Re: the quotation mark is replaced with left/right double quotation mark

    Hi @v-bofeng-msft ,

     

    thank you for response.

    I provide with more details - my bot uses the Power Automate flow to get the list of the topics.

    The output from flow looks as presented: 2024-03-20_8-47-20.png

    If I try to display data I lost " and I see: “value here” - it cannot be interpreted as json ;(

    It looks like some internal mechanism replace " to  “value here”  

     

  • Re: the quotation mark is replaced with left/right double quotation mark

    Hi @mazyd ,

     

    I've made a test for your reference:

    vbofengmsft_0-1710815920117.png

    vbofengmsft_1-1710815975177.png

    {
     type: "AdaptiveCard",
     '$schema': "http://adaptivecards.io/schemas/adaptive-card.json",
     version: "1.2",
     body: [
     {
     type: "Input.ChoiceSet",
     choices: Topic.Var2,
     placeholder: "Placeholder text",
     id: "1"
     },
     {
     type: "ActionSet",
     actions: [
     {
     type: "Action.Submit",
     title: "Submit",
     id: "2"
     }
     ]
     }
     ]
    }

    Result:

    vbofengmsft_2-1710816003472.png

     

    Best Regards,
    Bof

     

Helpful resources

Quick Links

Exciting News for Copilot Studio Communi…

Get ready to experience a whole new level of engagement with the Copilot Studio…

Celebrating the May Super User of the…

LaurensM is an exceptional contributor to the Power Platform Community…

Check out the Copilot Studio Cookbook…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 137,998

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,059

Leaderboard

Featured topics