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

Add Multiple columns to a Gallery Using Filter, AddColumns and LookUp

I have been looking at other posts in the community and have been able to partially solve my problem, but I'm guessing there is a more efficient way to go about this. Here's the scenario:

 

I have an app that has two SharePoint Lists

Spend Request (this is the parent list)

  • Title
  • Created By
  • Supplier
  • Amount

Spend Request Admin (this is the child list and there can be multiple children per parent)

  • Request ID
  • Task
  • Task Status

I have a gallery that is pulling in the Spend Request Admin list. I want to add multiple columns from the Spend Request parent list using AddColumns and Lookup where the ID in the Spend Request equals the Request ID field in Spend Request Admin list.

 

I have my gallery Items property set as follows and this is working. However, it seems to me that performing the LookUp multiple times is not efficient. There’s probably a much better way to do this, but I can’t figure out the syntax. Does anyone have any suggestions? Any help is greatly appreciated!

 

AddColumns(

    Filter(

        'Spend Request Admin', (FinanceLead.Email = gbl_User & 'Marcomm Finance Status'.Value <> Complete) || (VendorLead.Value = gbl_User & 'Vendor Setup Status'.Value <> Complete)

        ),

        "Request Name",LookUp(

            'Spend Request',ID in 'Spend Request Admin'[@RequestID],Title

            ), "Supplier",LookUp(

            'Spend Request',ID in 'Spend Request Admin'[@RequestID],'Supplier Name'

            )

            )

1 ACCEPTED SOLUTION

Accepted Solutions
Drrickryp
Super User II
Super User II

Hi @tsparkman 

That is pretty much how I would do it.  The other way would be to simply filter and sort your child list as the Items of the gallery and put the Lookups inside the gallery as labels.  That works as long as you aren't using them for filtering or sorting the list.

 

"If it ain't broke, don't fix it"

View solution in original post

2 REPLIES 2
Drrickryp
Super User II
Super User II

Hi @tsparkman 

That is pretty much how I would do it.  The other way would be to simply filter and sort your child list as the Items of the gallery and put the Lookups inside the gallery as labels.  That works as long as you aren't using them for filtering or sorting the list.

 

"If it ain't broke, don't fix it"

View solution in original post

Hi @Drrickryp  - 

 

Thanks so much for your reply! I'm new to Power Apps and sometimes I worry that the way I can "figure out" how to make things work may not always be the right or best way 😀 

 

It is so good to have this forum as a way to reach out to more seasoned folks like you for guidance!

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 (58,061)