Re: Access to PowerApps data for guest users
This should be the correct syntax for the switch condition. The Switch statement determines if the condition, in your case
User().Email in 'Office365-Gruppen'.ListGroupMembers("8817934c-f6aa-43c5-a893-4e62ac6c5384").value.mail
to see if it is true then will process the first two set functions,
Set(varVorname;LookUp(Klassenzugehoerigkeit;Eltern1=User().FullName;First(Split(Eltern1, " ")).Value));;
Set(varNachname;LookUp(Klassenzugehoerigkeit;Eltern1=User().FullName;Last(Split(Eltern1, " ")).Value))
and exit the switch statement. If the condition was false it would process the other set functions,
Set(varVorname;LookUp(Klassenzugehoerigkeit;Eltern2=User().FullName;First(Split(Eltern2, " ")).Value));;
Set(varNachname;LookUp(Klassenzugehoerigkeit;Eltern2=User().FullName;Last(Split(Eltern2, " ")).Value))
);;
Here is the full Switch statement code
Switch(true
;
User().Email in 'Office365-Gruppen'.ListGroupMembers("8817934c-f6aa-43c5-a893-4e62ac6c5384").value.mail;
Set(varVorname;LookUp(Klassenzugehoerigkeit;Eltern1=User().FullName;First(Split(Eltern1, " ")).Value));;
Set(varNachname;LookUp(Klassenzugehoerigkeit;Eltern1=User().FullName;Last(Split(Eltern1, " ")).Value))
;
Set(varVorname;LookUp(Klassenzugehoerigkeit;Eltern2=User().FullName;First(Split(Eltern2, " ")).Value));;
Set(varNachname;LookUp(Klassenzugehoerigkeit;Eltern2=User().FullName;Last(Split(Eltern2, " ")).Value))
);;
However for the code below would process given there is no condition to be met and would rewrite the data stored in the variables varNachname and varVorname which you have used in your Set statements above. Is there another condition you want to run this code for?
Set(varNachname;'Office365-Benutzer'.MyProfile().Surname);;
Set(varVorname;'Office365-Benutzer'.MyProfile().GivenName))