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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,626)