cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Harley525
Helper III
Helper III

Filtering data user

I want todo two things  one i want to filter my data for the user that has logged in and i want to not filter data for my app for the admin user.

 

I get one error on the first issue see attachments.

and for the second issue i don't know how to do this.

 

I hope to hear from you all how to solve this.

2 REPLIES 2
zmansuri
Super User
Super User

App: OnStart:

Set(varUser,Lower(User().Email));

Gallery Item:

Filter(DataSource,Lower(Office365Users.MyProfileV2().mail)=varUser);

 

if you have 1 or 2 admin and they are there for long time. You can hardcode their email id. Else you will have to create a table and provide them roles. or add roles to your existing user table.

Filter(DataSource,Lower(Office365Users.MyProfileV2().mail)=varUser || varUser=""xyz@gmail.com || varUser="abc@gmail.com");

that way if abc or xyz logs in they see all the data. but if someone else logs in they will see only their data

---------------------------------------------------------------------------------------------------------------------------


Was I helpful? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. It will help other users to find it faster.

follow me on Twitter @zmansuri123,
connect with me on LinkedIn from Here

 

When using the email of the user and your data source is growing i can only see 500 in the preview,

i have seen in a video of Shane Young that you can go around this with the user id as you can see in the attachment of my first question.

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (2,110)