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 / Datacards conditional ...
Power Apps
Answered

Datacards conditional visibility

(0) ShareShare
ReportReport
Posted on by 42

Hello everyone! 🙂

In general I have a gallery on a screen and an edit form on another screen. 

The edit form has different data cards but I don´t need all of them to be visible.

I would like to get visible some of them only depending on the element selected from the gallery. 

Should I use the "If condition"? If so, I´m having some issues because it seems not possible to detect these values from another screen. 

Here an example:

This is the screen called "Gallery" which contains a gallery and a blue button that connect to a different screen.

mtere_0-1692864846921.png

Let´s say I selected the first item from the gallery, the "EURU 021003-3".

We can see that there are other elements into this item, like "PMC".

This is important, because only if the item has "PMC", some Data Cards on the second screen will be visible. 

I selected the first item from the gallery, I press the blue botton and I´m on this screen:

mtere_1-1692865060354.png

We can see there are some data cards. Let´s take the second one "Behälter außen frei von Ladegut":

I want to hide the card in general but make it visible only if the first item having "PMC" has been selected previously from the Gallery.

 

Please help me 😞

Categories:
I have the same question (0)
  • Verified answer
    TSte Profile Picture
    246 on at

    Hello,

    in the Datacard visibility setting try to use a if condition:

    If(GalleryXX.Selected.XXX(what contains PMC)XXX = "PMC";true;false)

     

    this should work..

     

    best regards

    Thomas

  • mtere Profile Picture
    42 on at

    Thank you so much, it worked! 😍

    I have the last question: How would be the syntax if I have multiple If Conditions?

    For example, I used this code to make it visible based on the Gallery value: 

    If(Gallery1.Selected.Subtitle2.Text="PMC",true,false)

    What if I want to make it visible a card based on selecting a button, in addition? In this case the button is on the same screen and I want that the data card keep being visible instead of appearing only if I press the button. 

    Do you get what I mean?

    What should I add to my original formula?

  • AlexTheKidd Profile Picture
    178 on at

    Hi @mtere ,

     

    In an If condition, you can add multiple conditions.

     

    Example:

    If(Gallery1.Selected.Subtitle2.Text="PMC", true, Gallery1.Selected.Subtitle1.Text="Example text", true, Gallery1.Selected.AnyText.Text="Another example text", true, false).

    If( condition, then result, condition, then result, condition, then result, false result)

  • TSte Profile Picture
    246 on at

    You can do also do it like that:

    If(Gallery1.Selected.Subtitle2.Text="PMC" && Additional Argument ,true,false)

     

    best regards

    Thomas

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard