I have a PowerApp where a SharePoint list is the data source. A people picker field is in the list. The app allows a user to enter a position request. The people picker field in the app is for who is creating the request. One screen in the app is "My Requests" which filters a gallery by all record's whose people picker field match that of the current logged in user. This works beautifully; however we have a few users that belong to a different department whose email addresses do not match ours. We have assigned them an F3 license for them to use our app, which gives them an email address matching our organization. Therefore, when they enter the position request, they select themselves in the people picker field, which uses the email address of abc@da.gov (for example) from their organization, but the logged in user is abc@myorg.gov (for example), from our organization. As a result the filter in the gallery doesn't resolve to show them "My Requests". I created an On Start variable as follows:
Set(varCurrentOfficeUser,Office365Users.MyProfileV2().userPrincipalName);
Then filtered the gallery as follows:
Filter(datasource,Requestor.Email = varCurrentOfficeUser) where Requestor is the people picker field.
It is not working. Any suggestions?