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?
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! 🍻
WarrenBelz
146,605
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,946
Most Valuable Professional