Showing results for 
Search instead for 
Did you mean: 
Advocate I
Advocate I

Only show when...

I have an order form (for multiple items) that creates an adaptive card in teams. I'd like the adaptive cards' text blocks  to "only show when" the items that have a qty greater than 0. Or not display if they are 0 or empty.


I'm just puzzled on the format required. The field in the designer element properties inst very clear.


Thoughts? I would need to reference a dynamic Sp list item. I imagine it would be easy enough with the right formatting 



Hi there - So, I did something similar with a Compose which had a combination expression of if(empty(<your field>),'',<your field>)


There might need to be a body() or items() depending on where your field is, but something like that should work.


Keep us posted.



If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

Yea, I have no idea unfortunately. Searching didn't come up with much. Even directly with MS. Seems like there would be a ton of potential and I'm surprised I cant find much info on it.




I have the same problem when building adaptive cards. 

I want to show a text block only if one Input.toggle value is on (true). 

I don't know how to use the feature "only show when" in that case. 

Could somebody help me?




I had been searching for an answer on how to use "Only show when", because the documentation is non-existent.  I've just started to have some luck with hiding text blocks, using the following in the "Only show when" field:  ${$root.change.NewEmploymentType == 'Full-time'} with the following Sample Data:

    "change": {
To hide if/when there is no data for "NewEmploymentType", use "${$root.change.NewEmploymentType != ''}".
I have yet to test utilizing this adaptive card in Power Automate and rendering in Teams, but I assume that it should work properly.  I'll follow up if it does not.  Just hoping this helps someone get a start with this useful but undocumented feature!

Hi @vbenkert 
I have the same problem but don't really understand your answer.

I have a choice set with id "choice" and the possible answers "yes" and "no" and a text field with the id "text". How can I only show the text field, when the user chooses "yes" at the choice set?

I would love if you could explain your solution a little bit more in detail.
Thank you for your help!

Helpful resources

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,746)