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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (3,164)