Hi there @powerappsrooki
First of all welcome to the #PowerAddicts family 😊
If you want to show Records to "Normal users" and "Admins", you will have to set those users somewhere.
Here are some options:
- O365 Groups
- SharePoint List
- Additionaly, you could use security roles if you were using Dataverse.
As a quick fix I suggest you use a SharePoint List to configure who are the Admins. Nevertheless, if you need a more robust and secure fix, use O365 Groups (the better practice)
Using a SharePoint List you just need to add a collumn of type "Person or Group " (lets call it "User") in that list (lets now called it "PowerAppAdmins") and insert the users you want to.
On the PowerApp side, you can then use this:
On the OnStart
If(
IsBlank(LookUp('PowerAppAdmins', ThisRecord.User.Email = varUser)),
Set(
Admin,
false
),
Set(
Admin,
false
)
)
On the Items
If(
Admin,
TestSharePointList,
Filter(‘TestSharePointList’, Email = varUser.Email);
)
This way you have two account types, the Admin one, who needs to be listed in the SharePoint List called "PowerAppAdmins" and the default user type, who can only see his records.
Let me know if this worked out for you 😀