MicrosoftDocs / AdaptiveCards

Docs for Adaptive Cards
https://docs.microsoft.com/en-us/adaptive-cards/
Creative Commons Attribution 4.0 International
72 stars 138 forks source link

Suggesting opposite of $when - When condition is TRUE the element will not appear to the user. #312

Open Surabhi-Ojha opened 4 years ago

Surabhi-Ojha commented 4 years ago

I use Adaptive cards and I love it. I was going through Conditional layout with $when section. I felt that if we could have something opposite of $when it would be much easier to implement some case. Like if a condition is true then element does not appear to the user.

Consider the case: A card is used by multiple module, it has a button say see more which is renders for all those module.

Suddenly we need to use the same card without that button see more.

Now to use the same card I need to introduce a parameter like show_button which could be true or false. This approach will require change in multiple file.

Instead if we could have something to address this issue where, when a condition is true the element will not be rendered to the end user, this approach will solve a lot of time.


Document Details

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

HAZET commented 3 years ago

Hi, isn't that easily achieved by using NOT with the condition? Best Henrik