cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Bogs
Helper I
Helper I

How to filter data in the list by who submits it

Hello,

I new with the power apps. I'm trying to create a power apps that filters the data in my list base on who submit the record.

The scenario is this.

1. Kurt log in the app

2. Once login the app should display only the records submitted by him or created by him in the list

excel.PNGListPNG.PNG

Hope you can help me, and show me how to do it by screenshots

1 ACCEPTED SOLUTION

Accepted Solutions
eka24
Super User III
Super User III

The should be put at the beginning or end of the code separately. Example:

 

Set(Loguser,TextInput1.Text);

If(TextInput1.Text in Table1_2.Username && TextInput2.Text in Table1_2.Password, Navigate('List of Report Bugs',ScreenTransition.Fade), Navigate('Password Invalid',ScreenTransition.None))

 

Kindly adjust your main login code to what was working for you as the variable has nothing to do with the login code

 

Maintain the Filter code. That is okay

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

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

15 REPLIES 15
jlindstrom
Super User
Super User

assuming your data source is Sharepoint, There is a standard created by field in your list, and you can filter by it.

 

Issue is that User() filters are not delegatable, so if you have more than 500-2000 records, you will need to make other arrangements.

 

OnStart of app

 

Set(
    Var_user,
    User().FullName
)

 

In your gallery:

 

Filter(ColTimesheets, 'Created By'.DisplayName = Var_user)

 

eka24
Super User III
Super User III

Assuming your Excel Table name is Table3, put this formula on the Items property of the Gallery;

 

Filter (Table3,'Submitted By'=User.FullName)

 

Am assuming that the submitted by Column has the users FullName.

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

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi jlindstorm,

 

I don't have 500 records in my data likewise can you show me how to create it

 

Thanks

Updated my answer with an example.

IF you find your data goes over 500 records, you can go to the app settings and increase the delegation limit up to 2000 records

cds
Impactful Individual
Impactful Individual

I like to give users an option to 'view all' or 'view mine' it can be a toggle, checkbox, whatever.

 

If(Toggle1.Value,
SortByColumns(Filter(Table3, 'Submitted By', User().DisplayName), Created, Descending),
SortByColumns(Table3, Created, Descending)

Hi eka24,

 

I've to use the formula but got some error " Filter (Table3,'Submitted By'=User.FullName)"

 

errorPNG.PNG

 

but when I've tried this one" Filter (Table1,'Submitted By'= User().FullName)" it shows the record but when I try to login with a different user in the power apps that i created it does show any records, maybe there is missing in the formula?

 

eka24
Super User III
Super User III

Sorry I left out () in the User (). FullName;

 

Filter (Table3,'Submitted By'=User().FullName)

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

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi eka24,

 

How about the record of other user when I tried to log in using different user I still shows the record of Marvic not the record of Kurt. maybe I've missing something?

login.PNGrlist.PNG

 

 

 

cds
Impactful Individual
Impactful Individual

replace User() with Username

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (70,756)