cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
seussiii
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.

 image.png

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

5 REPLIES 5

@seussiii 

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.

-Ed

 

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.

image.png

Hello, 

 

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?

 

Regards, 

 

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": {
        "NewEmploymentType""Full-time"
    }
}
 
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

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,272)