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

Filter combobox on gallery but displaying a custom lookup field

Hi all,

 

I filtered a combobox based on a gallery and that works:

Filter(Delistings, DelistingID in BrowseGallery3.AllItems.DelistingID

When I display DelistingID it works

Lars1990_0-1639562216710.png

When I want to display a lookup column product it does not work. Anyone who knows why?

 

Lars1990_1-1639562320864.png

 

Kind regards,

 

Lars

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-chenzhi
Community Support
Community Support

Hi @Lars1990 ,

 

Do you want to display the value of the lookup column in the ComboBox?

Could you please tell me what's your datasource?

I assume you have this in SharePoint and have a test on my side, please try the following workaround.

vchenzhi_0-1639720122152.png

Set the items property of ComboBox to:

AddColumns(
    Filter(
        ListName,
        ID in Gallery.AllItems.ID
    ),
    "ColA",
    ThisRecord.TTlookup.Value
)

vchenzhi_1-1639720537607.png

 

Best Regards,

Zhi Chen

 

 

 

View solution in original post

3 REPLIES 3
v-chenzhi
Community Support
Community Support

Hi @Lars1990 ,

 

Do you want to display the value of the lookup column in the ComboBox?

Could you please tell me what's your datasource?

I assume you have this in SharePoint and have a test on my side, please try the following workaround.

vchenzhi_0-1639720122152.png

Set the items property of ComboBox to:

AddColumns(
    Filter(
        ListName,
        ID in Gallery.AllItems.ID
    ),
    "ColA",
    ThisRecord.TTlookup.Value
)

vchenzhi_1-1639720537607.png

 

Best Regards,

Zhi Chen

 

 

 

You are a genius, it works. Can you explain what AddColumns does to make this work?

Hi @Lars1990 ,

 

Lookup is a complex column, combobox only supports simple columns.

The structure of lookup is id and value.

Created a new column 'ColA' with AddColumns to save the value of lookup, so colA is a simple column.

 

Please refer to this article for the use of this function:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-table-shaping

 

 

Best Regards,

Zhi Chen

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,943)