cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bmurphy1
Level: Powered On

Re: Limiting Data Visibility Based On User ID

So how do I get it to show all the contacts I created right when I open the app?  The filter settings are OnVissible.  Where else do they need to be.

 

I tried OnHidden but that didn't seem to work.

bmurphy1
Level: Powered On

Re: Limiting Data Visibility Based On User ID

@rebeccas 

For the gallery this is what I have OnVissible

 

ClearCollect(CollMyItems, Filter('Rep 1 Test', 'Created By'.DisplayName=_CurrentUser))

bmurphy1
Level: Powered On

Re: Limiting Data Visibility Based On User ID

@rebeccas @v-xida-msft 

 

I changed the browse screen to

OnVisible - ClearCollect(CollMyItems, Filter('Rep 1 Test', 'Created By'.DisplayName=_CurrentUser, User().FullName))

 

With the "User().FullName" addition near the end it appears to have fixed my problem.  It did send a warning:

 

"Delegation Warning. The "Filter" part of this formula might not work correctly on large data sets" 

Community Support Team
Community Support Team

Re: Limiting Data Visibility Based On User ID

Hi @bmurphy1 ,

Have you taken a try with the solution I provided above?

 

Based on the formula you provided, I think there is something wrong with it. Actually, the Delegation warning issue is not an error, it just means that you could not delegate the data process to your data source, instead, you could only process data locally.

In default, you could only process 500 records locally at most in your app. You could change this limit to maximum value -- 2000, then you could process 2000 records locally at most within your app.

More details about the Delegation in PowerApps, please refer to the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/delegation-overview

 

Currently, the User().FullName formula could not be delegated within Filter function. On your side, please consider save the the  User().FullName formula into a variable, then use the variable as filter value in your Filter function.

Please set the OnStart property of App to following:

Set(CurrentUserName, User().FullName)

Then set the OnVisible property of your screen to following:

ClearCollect(
              CollMyItems, 
              Filter('Rep 1 Test', 'Created By'.DisplayName = CurrentUserName)
)

then save and re-load your app (fire the OnStart property of App), then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
bmurphy1
Level: Powered On

Re: Limiting Data Visibility Based On User ID

@v-xida-msft 

Yes, I tried your previous formula(s) but it broke the functionality.  I had to go back to what I had before, and it seems to be working across multiple users.

Highlighted
Super User
Super User

Re: Limiting Data Visibility Based On User ID


@bmurphy1 wrote:

So how do I get it to show all the contacts I created right when I open the app?  The filter settings are OnVissible.  Where else do they need to be.

 

I tried OnHidden but that didn't seem to work.


 

For this do you mean that you want to have an option to either show all the items or show it filtered? We have a lot going on this thread...I think I am getting myself confused now..lol. 

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,713)