I have tried to search many places but I don't see any doc talk about how to use it.
I have tried to search many places but I don't see any doc talk about how to use it.
Without seeing more of your card, I think you need to remove the second $. Here's a very simple example:
Card:
{
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"size": "Medium",
"weight": "Bolder",
"text": "${title}",
"$when": "${showTitle == true}"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.3"
}
Data:
{
"title": "This is a title",
"showTitle": true
}
If you change showTitle to false in the data, the text will no longer show.
if you like to use 'if not' logic, here is the example
"$when": "${$root.variableName != \"test\"}"
The block will show if the value is not "test"