Skip to main content

Notifications

Copilot Studio - Calling Actions from Copilot S...
Unanswered

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

(0) ShareShare
ReportReport
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

     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,475

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,767

Leaderboard

Featured topics