Announcements
i have created sharepoint form, in the same screen i added button. now i want to check condition like login user().email should match with sharepoint record 'Created By' Email of visible record in screen. based on this button should have edit control or else it should disable.
any idea how to do this ?
HI @venky232 ,If you have created a standalone app and have used a gallery to display items, you can use below logic - On DisplayMode property of button - If(LookUp(SPListName, ID=GalleryName.Selected.ID).'Created by'.Email = User().Email, DisplayMode.Edit, DisplayMode.Disabled)If you are customizing form, you can use -
On DisplayMode property of control - If(LookUp(SPListName, ID=SharepointIntegration.SelectedItemID).'Created by'.Email = User().Email, DisplayMode.Edit, DisplayMode.Disabled)
i used this option
but for any record i selected it showing as disabled button only
Try adding the button as a datacard inside the form and use below formula - If(Form1.Mode<>FormMode.New, If(Lower(LookUp(SPListName, ID=ThisItem.ID,'Created by').Email) = Lower(User().Email), DisplayMode.Edit, DisplayMode.Disabled))
button showing as edit mode for non matching username also.
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 325 Most Valuable Professional
11manish 165
MS.Ragavendar 88 Super User 2026 Season 1