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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How do I create a coll...
Power Apps
Unanswered

How do I create a collection of context variable of data cards

(0) ShareShare
ReportReport
Posted on by 12

I would like to control the visibility of controls on screen with a variable.

For menu navigation I created a table with screens like this, and it is working:

 

UpdateContext({Tasks:
[
{title:"Restore group by search",screen:AllDeletedGroups,details:"Restore a deleted group or team by searchig for properties"},
{title:"Restore group by owner",screen:DeletedItems,details:"Restore a deleted group or team by owner"},
{title:"Update OneDrive Quota",screen:sOneDrive,details:"Read or set OneDrive Quota for a user"},
{title:"Search guest users",screen:GuestUsers,details:"Search guest users and view account details"},
{title:"View group owners",screen:Groups,details:"Search a group and view members and owners"}
]

})

 

This works fine. For DataCard visibility I tried the similar way (assuming that the screen in the formula above is some kind of type declaration):

 

UpdateContext({cards:
 [{card:Title_DataCard1} ]
 })

 

But I get an error: Name isn't valid, the identifier isn't recognized. The name is correct, I assume that the type is something else. Tried datacard too, didn't work either. Can somebody please give me a hint?

Thanks,

vm

Categories:
  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @vlm_mv ,

     

    Do you want to use a context variable to control Cards Visible?

     

    If you do, you could apply formula like below to :

    UpdateContext({cVisible:!cVisible})

     

    Please refer to below threads to learn more:

    https://powerusers.microsoft.com/t5/Building-Power-Apps/make-fields-visible-on-a-button-click/td-p/404022

    https://techcommunity.microsoft.com/t5/power-apps-power-automate/make-field-visible-depended-on-other-field-powerapps/m-p/51876

     

    In addition, Screen/Form/DataCardValue controls could be used in that UpdateContext syntax but Card could not.

     

    Hope this helps.

     

    Best regards,
    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard