Card Block Internal Value for Dynamic Data
Reproduction
I want the internal value of a selected card to be dynamic — in this case the ID associated with the team from the
Sample data:
When the user clicks on the Card with
That internal value (selected card) should also be saved in a variable
Suspected issue
The
↓ In the following example, I set the arrays variables with a
I confirm that the variables are created and with the expected data, as the cards are successfully dynamically generated from them.
- Set some variables that are arrays of strings, such as
teamsIds,teamsNamesandteamsCities - Connect a Card block, with dynamic data:
{{teamsNames}}as itsTitle,{{teamsCities}}as itsDescription, and an arbitrary string for the button such asCheck Team Matches - Try to put
{{teamsIds}}as the Card'sInternal value - Preview the bot
I want the internal value of a selected card to be dynamic — in this case the ID associated with the team from the
teamsIds array.Sample data:
const teamsIds = [12, 4]const teamNames = ["Hawks", "Celtics"]const teamsCities = ["Atlanta", "Boston"]When the user clicks on the Card with
Celtics as its Title, I want the internal value of the selected card to be its associated ID in teamsIds, which is 4 in this case.That internal value (selected card) should also be saved in a variable
selectedTeam.Suspected issue
Internal value seems to only work as expected when the data isn't dynamic and that the internal value is a fixed string, regardless of which option we selected.The
Save in variable option only allows to save a specific field from the card (like "Title", "Description" etc.) and not its internal value (which defeats the purpose of an internal value aside from solely displaying it to the user?).↓ In the following example, I set the arrays variables with a
Script block that simulates the API call I'll make in production (which you get a peek at below it), with setVariable() lines.I confirm that the variables are created and with the expected data, as the cards are successfully dynamically generated from them.
