cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hackondor
Frequent Visitor

Filter for ComboBox items (options) and display choice column value

Hello,

 

I have a gallery with a Combobox and I'm trying to get items (options) to display on this Combobox based on a value in "ThisItem"

 

I've tried many formulas without success.

 

-The Language field is a choice column

hackondor_0-1635870780891.png    

hackondor_1-1635870876463.png

 

Expected result:  ["en", "fr"...]

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
hackondor
Frequent Visitor

Finally found the solution from this article, thank you guys for your help:

 

Distinct(Filter('TDS-Generated-Master', 'TDS-Generated-ID'=ThisItem.'TDS-Generated-ID'),Language.Value)

 

 

View solution in original post

8 REPLIES 8
PTBBSolutions
Solution Supplier
Solution Supplier

What is the error which you get? Or the combobox is just empty?

 

Please check if the Search Values and the Display Values of the combobox are referring to the correct name.

Hi @PTBBSolutions 

 

When i filter by the current record like "ThisItem.'TDS-Generated-ID'" I have no error in the formulas but no result either with the message below:

hackondor_0-1635872274318.png

 

Once I change to the text (hardcoded value) for my filter function like "TDS-Generated-ID'="TDSGEN-68"" I get the expected result but I can't access the value because language is a choice column so get "record", see below:

 

hackondor_1-1635872515735.png

 

Regarding your question:  

 

DisplayFields: ["Value"]

 

SearchFields: ["Value"]

 

Best

PTBBSolutions
Solution Supplier
Solution Supplier

@hackondor 


Could you please put thisitem.TDS-Generated-ID in a label control and see the output. Also insert another label and write "thisitem.TDS-Generated-ID = "[the manually copied string from your example]", and see if the result = true

The result is as expected but i have no result when I compare with ThisItem.TDS...

 

as a workaround, I added a label text and I get the value from there, but my goal is to access the value in the record because language is a choice column and I can't add ".Value" at the end of the formula to get the value

 

hackondor_0-1635874132517.png

 

PTBBSolutions
Solution Supplier
Solution Supplier

Hi @hackondor 

 

What is  the data type of thisitem.TDS-Generated-ID coming from the source?

hackondor
Frequent Visitor

@PTBBSolutions   a simple "single line of text" "text type" my data source is SharePoint and the formulas in my items for the gallery is:

 

Filter('TDS-Generated-Master', Status.Value="Published")

hackondor
Frequent Visitor

Finally found the solution from this article, thank you guys for your help:

 

Distinct(Filter('TDS-Generated-Master', 'TDS-Generated-ID'=ThisItem.'TDS-Generated-ID'),Language.Value)

 

 

PTBBSolutions
Solution Supplier
Solution Supplier

Hi @hackondor 

 

Have in mind that Distinct is not deligable - not sure if this matters to you. My last suggestion will be to save+publish the app, close it and re-open it. Sometimes the comboboxes just bug.

 

Let me know if this helps.

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 (1,584)