Hey everyone,
so I’m currently in the midst of building out a power app application to help modernise our expense reporting.
We’ve had a to make a shift on where the data is being stored from originally wanting to build the power app using dataverse as our backend and now we are using Microsoft Lists.
Anyways, everything has been going great however one issue we are coming across similar to dataverse is I want to only allow team members to see their own expenses rather than everyone else’s in the company. To do this I have used the following code which limits expenses to be seen by the user who created the item
SortByColumns(
Filter(
[@'Expense Report'],
StartsWith(Title, TextSearchBox1.Text) && 'Created By'.Email = User().Email
),
"Title",
If(SortDescending1, SortOrder.Descending, SortOrder.Ascending)
)
the ‘Created By’ column email address is pulling a domain email address (for example if Joe bloggs where to create an expense it would pull joebloggs@waterfront.co.uk or joebloggs@belfasticc.co.uk)
However users will login to the power apps using another domain (joebloggs@Belfastcity.co.uk) which means that they won’t see their expenses due to the email addresses not matching
Is there a way with using power automate to take the data from the SharePoint list -> ‘Created By’ column and converting the domain name in another column called ‘transformed email’
e.g. joebloggs@waterfront.co.uk (created by Column data) ->joebloggs@belfastcity.co.uk (transformed email column data)
This way all I need to do is change the code to reflect the new column
Really appreciate any advice on how to do this!
Thanks,
Matthew