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 / Visible condition not ...
Power Apps
Unanswered

Visible condition not working based on a value within a gallery

(0) ShareShare
ReportReport
Posted on by 30

Hi, I am currently pulling data from a SharePoint list, and using two dropdowns as filters to display the correct data. When the 'Status' text input gets populated with 'Not Permitted' text from the list, I want to display a message on screen - I'm using the 'if' statement below, but it does not seem to be working. Any ideas?

 

bilalzsyed_0-1652180723958.png

 

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    this is not the better way to do this, i dont know what you really want, it seems like some test to discovery how the power apps works, i guess the more easy, is using some selectable component, like a combobox or dropdown, check box or something like that. at the same way you can use variables to control the status and use like a negative if you cant show the component. 

     

  • bilalzsyed Profile Picture
    30 on at

    I simply want to display a message based on the text value of an item in a gallery.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    ok, but your reference isn't a gallery item, i mean, in this cased is expected something like this:

    If(Variable=1;true;false)

     if you can use some value from galery something like this:

    If(ThisItem.galleryitem="sometihng here";true; false)

    i guess you have some problems with your references, or you logical is not clear for me. 

  • bilalzsyed Profile Picture
    30 on at

    Thanks - I tried using the 'ThisItem' operator but it is showing as not recognized in the 'Visible' field for the text I want to display.

     

    The second field in my gallery which will show 'Not Permitted' does have the following reference in 'Items' field called: ThisItem.'SharePoint column name'.Value.

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    try

    If(ThisItem.'SharePoint column name'.Value="you text to compare";true;false)
  • bilalzsyed Profile Picture
    30 on at

    Thank you for the suggestion - unfortunately i'm getting this error: Name isn't valid.'ThisItem' is not recognized.

     

    bilalzsyed_0-1652190925120.png

     

  • bilalzsyed Profile Picture
    30 on at

    Anyone else have any ideas?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    im sorry, i was thinking you are usign this inside the gallery, this is a little bit confuse to me, if you try to use in a gallery, how you get the selection from this item? I mean, is not clear to me what you trying to do. 

    i guess you field is out of the gallery and you are not working inside the gallery. 

    if this is correct you can try something like this:

    If(galleryname.Selected.columnname.Value="some text";"more some text";"other text")

    but you must to have a way to select this item of a gallery. 

    you could get the value in other way, maybe get directly from you datasource or usign a collection, its a little bit obscure to me what you want comparing what you doing 

     

  • bilalzsyed Profile Picture
    30 on at

    That's correct, the warning message I want to show dynamically is currently sitting outside the gallery (will it work better if it is contained within it?)

     

    The other way I was thinking to do this is push the value of the 'status' field in the gallery into another text input (i.e. mirroring its value), and apply some filtering based on that.

  • bilalzsyed Profile Picture
    30 on at

    My workaround above works - pushing the value of the gallery into a text input and filtering the message I want to display using that text input worked.

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
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard