cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

filter a sharepoint datasource to only show user() details

I have a Sharepoint data source with Name, address, email and car reg details.

I want to be able to display this datasource in a table / gallery / view form - but only data relating to the signed in user - i've tried this code

 

Filter(HENG_VehicleInformation,'E-Mail' = (User().Email))

 

but i am getting delegation errors - presumably because my 'Users' table has more than 2000 users?  The datasource only currently has 2 records - but the potential to have 100's.

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User III
Dual Super User III

Save the Current user's email to a variable in the OnStart property for the App.  Then filter on that variable.  The delegation issue will go away.

Set(CurrentEmail, user().Email)

Filter(DataSource, 'E-Mail'=CurrentEmail)


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

3 REPLIES 3
Dual Super User III
Dual Super User III

Save the Current user's email to a variable in the OnStart property for the App.  Then filter on that variable.  The delegation issue will go away.

Set(CurrentEmail, user().Email)

Filter(DataSource, 'E-Mail'=CurrentEmail)


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Many thanks for your help, the delegation error has vanished! 

 

Need to know how to display the fields I need from the datasource, but i'll fathom it out, cheers.

Dual Super User III
Dual Super User III

Just add the filter statement to the Items property for the Gallery.  THen you can edit the fields to display the fields you want.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (68,849)