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 IF statement o...
Power Apps
Answered

Visible IF statement on gallery (canvas app)

(0) ShareShare
ReportReport
Posted on by 99

Hello experts, I want to ask about how to use IF statement in visible properties. I want hide when it's still waiting for approval and only will be visible when it gets approved. 

 

I try with this, but it didn't work: 

If(ThisItem.Status = "Approved", true, false)
 
 

ChristoNindyo_0-1718868392220.png

ChristoNindyo_1-1718868812560.png

 

Categories:
  • anandm08 Profile Picture
    1,936 Super User 2024 Season 2 on at

    hi @ChristoNindyo ,

    have you used this code in the Visible property of the Status text label?

  • Verified answer
    v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @ChristoNindyo ,

     

    You can also use Filter function to show items with "Approved" in gallery.

    Items of Gallery.

    Filter(DataSource,Status="Approved")

     

    Best regards,

    Rimmon

  • ChristoNindyo Profile Picture
    99 on at

    Thanks,  @v-mengmli-msft .

    I already had this on item of gallery

    ChristoNindyo_0-1719199667672.png

    Sort(
     Search(
     AddColumns('Order Lists (New)',CreateByUser, 'Created By'.DisplayName),
     TextSearchBox2.Text,
     CreateByUser, 'Email Address'
     ),
     ThisRecord.Created,
     If(
     SortAscending2,
     SortOrder.Ascending,
     SortOrder.Descending
     )
    )

     

    How should I put the filter in item of gallery ?

    Filter('Order Lists (New)',Status="Approved")
     
  • ChristoNindyo Profile Picture
    99 on at

    I found how to put it all together, finally. 

    Filter(
     Sort(
     Search(
     AddColumns('Order Lists (New)',CreateByUser, 'Created By'.DisplayName),
     TextSearchBox2.Text,
     CreateByUser, 'Email Address'
     ),
     ThisRecord.Created,
     If(
     SortAscending2,
     SortOrder.Ascending,
     SortOrder.Descending
     )
     ),
    Status="Approved")

     

    Just like what you said, I used filter function on Items of Gallery. It works !

    Thank you so much.

  • ChristoNindyo Profile Picture
    99 on at

    yes, it didn't work according to what I want

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 337 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 250

#3
Mohsin Ali Profile Picture

Mohsin Ali 225

Last 30 days Overall leaderboard