Announcements
Seeking clarity.I am trying to set up a variable I can use throughout my app for filtering and showing/hiding fields and galleries.Below is my effort. What I don't understand are my '<>' results. The outcome is true, though I thought the '<>'symbols meant 'is not equal to'. The black box is a line from the admin SP List.My AccessLevel is 'Admin'. Shouldn't the result be 'false'?Set(varUserMail,User().Email);Set(varAdminRole, LookUp(AdminCollection, EmailAddress = varUserMail).AccessLevel.Value);
As far as I can tell, your syntax is correct. Can you confirm the value of varAdminRole once it has been defined like this is "Admin"?
Hi @Phineas - I'd echo what @madlad says - specifically the point that comparisons are case sensitive.
If varAdminRole were "admin" with a lower case a, that would result in what you're seeing.
I've placed a label with varAdminRole
Is the code to define it in the OnStart? If you've just added it, you'll have to run the OnStart at least once for it to be defined.
If you've done this, something is going wrong when it's being defined - either it's not finding the record, or it's not getting the role properly. I would try to add things to this slowly while testing to see what works and what breaks it.
Does it matter that the 'AccessLevel' SP List column is a 'Choice' column?Does this influence whether the formula should have 'value' at the end? Set(varAdminRole, LookUp(AdminCollection, EmailAddress = varUserMail).AccessLevel.Value);The column in the collection looks like this...
It looks like you AccessLevel is a multi-choice SharePoint column. In that case, you'll need to attempt to lookup the Admin row in the nested 'AccessLevel' table.
Set( varAdminRole, LookUp( LookUp(AdminCollection, EmailAddress = varUserMail).AccessLevel, Value="Admin" ) )
PA didn't like the formula.I know SP choice columns can be problematic, so I changed the 'AccessLevel' column to 'single line of text'.The new OnStart formula is - Set(varAdminRole, LookUp('External Meeting Request Admin', EmailAddress = varUserMail && AccessLevel="Admin"));The circled label has the following formula. It seems to be working. Label4.Text="Admin"
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.
11manish 243 Super User 2026 Season 2
WarrenBelz 204 Most Valuable Professional
Mohsin Ali 122