Try this , it should work.
{
type: "AdaptiveCard",
'$schema': "http://adaptivecards.io/schemas/adaptive-card.json",
version: "1.5",
body: [
{
type: "Container",
items: ForAll(Sequence(CountRows(Topic.KeywordsTable)),
{
type: "Input.Toggle",
id: "Keyword" & Value,
title: Index(Topic.KeywordsTable, Value).Value,
separator: true,
spacing: "medium"
})
},
{
type: "ActionSet",
actions: [
{
type: "Action.Submit",
title: "Action.Submit"
}
]
}
]
}
Topic.KeywordsTable is (you guessed it) of type table.
Jokes aside, it is a table generated from a string using Split(Topic.Keywords, " ") (where Topic.Keywords is a string of keywords).
I want to use this adaptive card to show a dynamic list of those Keywords (hence why i'm trasforming the string in a table to be used in the ForAll function) and i want to use the Input.Toggle so that the user can select the wrong keywords that should be forwarded as the output so that i can append them to a global variable of mine that stores stopwords.
Index is used to access the Value key-value pair for each element inside the Topic.KeywordsTable table.
Hope i was clear enough
Problem is with adaptive card and hence getting output related error.
Can you share more info like how your Topic.KeywordsTable is look alike and what is your objective of using Index. How you want things to render.
WarrenBelz
146,695
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,015
Most Valuable Professional