web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : wRcgLH6RzbDIiKAGIos1a/
Power Automate - General Discussion
Unanswered

Hide adaptive card object based on condition

Like (0) ShareShare
ReportReport
Posted on 3 Apr 2023 15:03:01 by 47

I have a simple adaptive card, with 3 input fields.

  • "ac_status" (visible at start)
  • "ac_category" (not visible at start)
  • "ac_comment" (not visible at start)

I am intending to conditionally unhide input fields ("ac_category" & "ac_comments") if the value of "ac_status" is "Closed".

 

{
 "type": "AdaptiveCard",
 "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
 "version": "1.4",
 "body": [
 {
 "type": "Container",
 "items": [
 {
 "type": "Input.ChoiceSet",
 "choices": [
 {
 "title": "Open",
 "value": "Open"
 },
 {
 "title": "Closed",
 "value": "Closed"
 }
 ],
 "placeholder": "Open / Closed",
 "isRequired": true,
 "errorMessage": "Input required",
 "label": "Status of the query:",
 "style": "expanded",
 "id": "ac_status",
 },
 {
 "type": "Input.ChoiceSet",
 "choices": [
 {
 "title": "Production issue",
 "value": "Production issue"
 },
 {
 "title": "Client issue",
 "value": "Client issue"
 }
 ],
 "placeholder": "Select category",
 "label": "Where does this query fall under?",
 "isRequired": true,
 "errorMessage": "Input required",
 "isMultiSelect": true,
 "id": "ac_category",
 "isVisible": false,
 "$when": "${ac_status.value == 'Closed'}" 
 },
 {
 "type": "Input.Text",
 "placeholder": "Placeholder text",
 "isMultiline": true,
 "label": "Additional Comments:",
 "id": "ac_comments",
 "separator": true,
 "isVisible": false,
 "$when": "${ac_status.value == 'Closed'}" 
 }
 ],
 "style": "default"
 }
 ]
}

 

I am unsure where i am going wrong with this. Please help me.

I have the same question (0)
  • mando643 Profile Picture
    26 on 14 Jul 2023 at 19:59:03
    Re: Hide adaptive card object based on condition

    Did you end up figuring this out having the same issue. Seems to work in the editor designer view but not in the actual teams action.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 736 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 396 Moderator

#3
Power Apps 1919 Profile Picture

Power Apps 1919 339

Last 30 days Overall leaderboard