Hi all,
i tried to reproduce the functionality of this tutorial, as i need to provide certain features to selected usergroups in my app.
i found similar code on several other posts in the net and gave it a try ...
https://medium.com/@brettjrandall/powerapps-hide-buttons-objects-based-on-office-365-group-membershi...
Now i came to 2 problems here:
1) the examples in the tutorial say, that the single commands are "divided" by semikolons ... when i do so only the first command works at all, everything else after the semikolon is ignored ..
2) using "&&" as "connector" shows me no errors but doesnt work either.
heres my code from the "OnStart" - Value
Set(CurrentUserUPN;'Office365-Benutzer'.MyProfile().UserPrincipalName)
&& ClearCollect(O365GroupMembers;'Office365-Gruppen'.ListGroupMembers("a958fc3f-6db5-4ef7-80f4-12342131232e").value)
&& Set(IsO365GroupMember;If(!IsBlank(LookUp(O365GroupMembers;userPrincipalName=CurrentUserUPN));true;false))
What am i doing wrong here `?
any ideas are strongly appreciated !
Kind regards and many thanks,
markus
Solved! Go to Solution.
Consider changing your OnStart Formula to the following:
Set(CurrentUserUPN;'Office365-Benutzer'.MyProfile().UserPrincipalName);;
ClearCollect(O365GroupMembers;'Office365-Gruppen'.ListGroupMembers("a958fc3f-6db5-4ef7-80f4-12342131232e").value);;
Set(IsO365GroupMember;!IsBlank(LookUp(O365GroupMembers;userPrincipalName=CurrentUserUPN)))
For your language settings, you need to separate lines with double semicolons ;;
I hope this is helpful for you.
Consider changing your OnStart Formula to the following:
Set(CurrentUserUPN;'Office365-Benutzer'.MyProfile().UserPrincipalName);;
ClearCollect(O365GroupMembers;'Office365-Gruppen'.ListGroupMembers("a958fc3f-6db5-4ef7-80f4-12342131232e").value);;
Set(IsO365GroupMember;!IsBlank(LookUp(O365GroupMembers;userPrincipalName=CurrentUserUPN)))
For your language settings, you need to separate lines with double semicolons ;;
I hope this is helpful for you.
Edit: Removed incorrect Information for clarity.
Actually, not in that language setting. All comas are represented with semicolons and semicolons for separators are replaced with double semicolons. Please refer to this document for chaining and list separators.
@z123 No worries - it all gets jumbled in the head sometimes 😉
Hey Randy, thank you so much. That did the trick.
Just for my convenience: whats the difference between ";" and ";;" .. as in every freaking "tutorial" there are only ";" mentioned when this peticular fx is listed ...
Thanks you anyway !
That's great!
So, basically, any place you see the comas, you will use a semicolon. And any place you see a semicolon, you'll use a double semicolon.
But, the meaning is, semicolons for you separate parameters in a statement and double semicolons separate different functions (chained functions).
User | Count |
---|---|
196 | |
122 | |
89 | |
48 | |
41 |
User | Count |
---|---|
285 | |
162 | |
138 | |
80 | |
73 |