SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.23k stars 992 forks source link

The index keyword is not working in Viva Connections Mobile (Teams app) #7543

Closed Rafaelki closed 2 years ago

Rafaelki commented 2 years ago

We are using Advanced templating in some of our adaptive cards. This works well in the dashboard when using the desktop browser but some keywords are not being replaced in the dashboard in Teams app on the phone. See below the example with the {$index} keyword:

DESKTOP: image

MOBILE: image

CODE SAMPLE

      body: [
        {
          type: "ColumnSet",
          $data: "${data}",
          separator: true,
          columns: [
            {
              type: "Column",
              width: "stretch",
              items: [
                {
                  type: "TextBlock",
                  weight: "Bolder",
                  text: "Item number {$index}",
                  wrap: true
                }
              ]
            }
          ]
        }
      ]

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ghost commented 2 years ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

patmill commented 2 years ago

Hi @Rafaelki - Can you try updating your reference to be

text: "Item number ${$index}"

(note the extra $)

Rafaelki commented 2 years ago

@patmill thanks, that's work both on desktop and mobile teams app

ghost commented 2 years ago

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues