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

Filtering based on Submitter

Hi

I'm building a powerApp and this power app retrieves information from a SharePoint list.

In this SharePoint list, I've many columns like:

Title, Description, Submission Date, Submitted By.

 

I've added a gallery and it's displaying to me all the records properly in the PowerApp.

 

What I want to do is to show ONLY items that corresponds to the person who submitted the request.

For example, if have submissions from John, Scott, Lisa, Cathy

and then Cathy uses the application, I wish to show ONLY items submitted by Cathy.

 

How can this be achieved?

Currently the items are shown per below:

 

SortByColumns(Filter([@'Demands Pipeline'], StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending))

1 ACCEPTED SOLUTION

Accepted Solutions
Drrickryp
Super User II
Super User II

HI @yjamous 

Try 

 

 

SortByColumns(
             Filter(
                    [@'Demands Pipeline'],
                    'Created By'.Email = User().Email && 
                      StartsWith(
                                 Title, TextSearchBox1.Text
                       )
               ), "Title", If(SortDescending1, Descending, Ascending)
)

Email is better than DisplayName as sometimes the DisplayName is not exactly the same as the User().FullName

 

 

View solution in original post

3 REPLIES 3
Drrickryp
Super User II
Super User II

HI @yjamous 

Try 

 

 

SortByColumns(
             Filter(
                    [@'Demands Pipeline'],
                    'Created By'.Email = User().Email && 
                      StartsWith(
                                 Title, TextSearchBox1.Text
                       )
               ), "Title", If(SortDescending1, Descending, Ascending)
)

Email is better than DisplayName as sometimes the DisplayName is not exactly the same as the User().FullName

 

 

View solution in original post

Thanks @Drrickryp 

Your reply puts me in a step in the right direction.

I can't use the Email of "Created By" since the entries are created by an automated workflow. So, all created by entries are associated with the user who created that workflow.

 

Is there a way that I can get the lastname and Firstname of a user based on their email User().Email?

 

Drrickryp
Super User II
Super User II

@yjamous 

You can get User().DisplayName

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

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

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (48,870)