Hi,
The PowerApp allows users to submit information that requires their Line Manager approval. They select their Line manager's email from a drop down that is populated using the office 365 data connection.
This is then submitted to the SP list as a text field.
The app then has a separate section that allows the managers to approve/decline the request that has been assigned to them using a gallery. I then originally used this Filter on the Item set of the gallery:
Filter(
'SPList',
If(
'Line Manager Name' = User().Email,
"Pending" in 'Line Manager Approval'.Value,
If(
'General Executive Name' = User().Email && "Approved" in 'Line Manager Approval'.Value,
"Pending" in 'GE Approval'.Value
)
),
Ascending
)
This worked fine throughout testing for lots of users. The app went live and two users are now reporting that they cannot see anything even though the request has been submitted.
I then changed the filter to:
Filter('SPLIST',
If(Lower(Trim('Line Manager Email')) = Lower(Trim(Office365Users.MyProfileV2().mail)),
"Pending" in 'Line Manager Approval'.Value,
If(Lower(Trim('General Executive Email')) = Lower(Trim(Office365Users.MyProfileV2().mail))
&& "Approved" in 'Line Manager Approval'.Value,"Pending" in 'GE Approval'.Value)),
Ascending)
Which resulted in the same issue.
The User().Email in a label does display their email address and so does the User().FullName.
I have now tried using the User().FullName instead of User().Email:
Filter(
'SPLISTl',
If(
'Line Manager Name' = User().FullName,
"Pending" in 'Line Manager Approval'.Value,
If(
'General Executive Name' = User().FullName && "Approved" in 'Line Manager Approval'.Value,
"Pending" in 'GE Approval'.Value
)
),
Ascending
)
Which has the same result.
Interestingly I am now being affected when I wasn't before. The filter works for my email address in the Studio but on the published app there are no results when there should be. We are looking into 'Approvals' in PowerAutomate to replace the 'Approve/Decline' process but the filter on users emails is still required for users being able to see what they have submitted.