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 : J46cP4cPzDsk9XNU1j7uXm
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:
I have the same question (0)
  • 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,585 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 892 Most Valuable Professional

#2
Power Apps 1919 Profile Picture

Power Apps 1919 356

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 310 Super User 2025 Season 2

Last 30 days Overall leaderboard