Announcements
If( Value(ThisItem.OpenSeats) = 0, DisplayMode.Disabled, Text(LookUp('Event Registration',Email = varUserEmail, Email)) = User().Email, DisplayMode.Disabled, DisplayMode.Edit )
What is your data structure? Are you looking up the same table that you are navigating in the gallery?
LookUp('Event Registration', Email = varUserEmail And EventRegistrationID = ThisItem.Id, Email)
(Or whatever you use in your situation to address a unique ID for each record - perhaps the ID column in the SharePoint record)
Additionally, rather than using nested IF conditions, you could write your statement using "And"/"Or" operators like so:
If(
Value(ThisItem.OpenSeats) = 0 Or Text(LookUp('Event Registration', Email = varUserEmail And EventRegistrationID = ThisItem.Id, Email)) = User().Email,
DisplayMode.Disabled,
DisplayMode.Edit
)
I think your problem is in using the "Lookup" function, as it will return the first record in the Event Registration table that meet your condition. I haven't done Power Fx so recently, but I think if you could put something like this to match the ID of the record you are retrieving to the ID of the item selected in your gallery, it might fix your problem: LookUp('Event Registration', Email = varUserEmail And EventRegistrationID = ThisItem.Id, Email) (Or whatever you use in your situation to address a unique ID for each record - perhaps the ID column in the SharePoint record) Additionally, rather than using nested IF conditions, you could write your statement using "And"/"Or" operators like so: If( Value(ThisItem.OpenSeats) = 0 Or Text(LookUp('Event Registration', Email = varUserEmail And EventRegistrationID = ThisItem.Id, Email)) = User().Email, DisplayMode.Disabled, DisplayMode.Edit ) Hope this helps! :)
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 366 Most Valuable Professional
11manish 184
MS.Ragavendar 99 Super User 2026 Season 1