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 : yTFg5+FgeyWOxpxbuvrXGJ
Power Apps - Building Power Apps
Answered

Gallery is blank make a icon disabled.

Like (0) ShareShare
ReportReport
Posted on 15 Nov 2023 12:31:11 by 559

Hi All,

I have a gallery when it is empty the Edit icon should not be allowed to click or it should notify "No rows are added to edit". If the gallery has values saved in SharePoint list then edit icon must be visible to edit the details in the gallery.

If I add notification even though the gallery has data it shows the "No rows are added to edit" message. 

If(
IsBlank(glrgate_4),
Notify(
"No rows are there to edit",
NotificationType.Information,
1000
),
!IsBlank(glrgate_4),
UpdateContext(
{
GlrPhaseWiseVisiblity: DisplayMode.Edit,
SaveIconVisible: true,
ResetIconVisible: true,
EditIconVisible: false,
AddIconVisible: true
}
)
)

I gave this code too but still t is not working.

Any suggestion on this?

Categories:
  • Sri Profile Picture
    559 on 15 Nov 2023 at 13:33:26
    Re: Gallery is blank make a icon disabled.

    @SpongYe 

    Thanks a lot. It worked perfectly.

  • Verified answer
    SpongYe Profile Picture
    5,580 Super User 2025 Season 2 on 15 Nov 2023 at 12:41:12
    Re: Gallery is blank make a icon disabled.

    Hi @Uthhra 

     

    IsEmpty() is used instead of IsBlank(). IsEmpty() checks whether a table contains any records, which is what you want to check in this case. If glrgate_4.AllItems is empty, it means there are no rows in the gallery, and the notification will be shown. Otherwise, the context will be updated.

     

    If(
     IsEmpty(glrgate_4.AllItems),
     Notify(
     "No rows are there to edit",
     NotificationType.Information,
     1000
     ),
     UpdateContext(
     {
     GlrPhaseWiseVisiblity: DisplayMode.Edit,
     SaveIconVisible: true,
     ResetIconVisible: true,
     EditIconVisible: false,
     AddIconVisible: true
     }
     )
    )

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete