Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Gallery is blank make a icon disabled.

(0) ShareShare
ReportReport
Posted on 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 at
    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 1 on at
    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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,605 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,946 Most Valuable Professional

Leaderboard