cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

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.

Highlighted
Helper II
Helper II

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))

Highlighted
Helper II
Helper II

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" 

Highlighted
Community Support
Community Support

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.
Highlighted
Helper II
Helper II

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,895)