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

Compare display name of direct reports in gallery to populate another gallery with record details where DisplayName matches "Created By"

I apologize if this has been asked before, but I was unable to find anything that was a close enough match to assist me in solving my problem.

 

I am VERY new to PowerApps, but I have been amazed at what I have been able to accomplish so far with a little help from Google. 

 

I am in the process of building a leave request app for my agency, and have a working app for the most part, but I have gotten a request from a supervisor in another department to be able to view the requests of their direct reports.  What I have done so far is to populate a gallery with the following:

 

Office365Users.DirectReports(Office365Users.MyProfile().Id)

 

This is successfully displaying the direct reports of the logged in user.  From there I'd like to be able to select a user which will navigate to a new page with a gallery that will display the leave requests of that user by comparing the DisplayName to the "Created By" field in my SharePoint list.  I suspect I will need to build a Filter in the Items control but I can't figure out how to make the comparison since equals and match have not worked for me.

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
v-albai-msft
Microsoft
Microsoft

Hi @SirNixalot,

I did a simple test for you to reference:

1. In my Screen 1, I have a gallery called "DirectReportsGallery":

v-albai-msft_0-1617867492157.png

Clicking the the arrow button next each record will navigate to Screen2:

v-albai-msft_1-1617867568277.png

2. In Screen2, I have another gallery. Set its items property to:

Filter(listname,'Created By'.DisplayName=DirectReportsGallery.Selected.DisplayName)

v-albai-msft_2-1617867674970.png

Check my result:

This is my list, only two records are created by "clover":

v-albai-msft_3-1617867784055.png

1212.gif

Best regards,

Allen

View solution in original post

2 REPLIES 2
v-albai-msft
Microsoft
Microsoft

Hi @SirNixalot,

I did a simple test for you to reference:

1. In my Screen 1, I have a gallery called "DirectReportsGallery":

v-albai-msft_0-1617867492157.png

Clicking the the arrow button next each record will navigate to Screen2:

v-albai-msft_1-1617867568277.png

2. In Screen2, I have another gallery. Set its items property to:

Filter(listname,'Created By'.DisplayName=DirectReportsGallery.Selected.DisplayName)

v-albai-msft_2-1617867674970.png

Check my result:

This is my list, only two records are created by "clover":

v-albai-msft_3-1617867784055.png

1212.gif

Best regards,

Allen

View solution in original post

SirNixalot
Regular Visitor

Perfect!  I knew it was something simple but was juuuust missing it.

 

Thank you!

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

Power Apps Community Call

Monthly Power Apps Community Call

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

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (45,912)