cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Amaga
Level: Powered On

IsSearchable not working on Filtered combobox?

Hi everyone,

 

I customized via PowerApps the form of a SharePoint list. On this form I need a lookup to another list, so I've changed the "Items" of the combobox to SortByColumns(Filter([@Contract], Active = "Yes"), "Title", Ascending).Title This allows me to show all active Contracts in the combobox. This works fine, however when I switch IsSearchable option of this combobox, there are no contracts displayed.

 

It's as if the IsSearchable switch is incompatible with the Filter() option. I don't understand why however. Once all records are loaded, why wouldn't the searchable combobox be able to search on the items in the list?

 

Is this a bug? Thanks for your advice!

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: IsSearchable not working on Filtered combobox?

@Amaga 

 

To update the field based on selected combobox value, you need to modify the "Update" property of your DataCard which holds this combobox control.
 
Lookup(Choices('Time Entry'.Contract), Value= ComboBox.Selected.Result)
 
This will pass the reference for Lookup field. Here, I am doing a filter on the choices of 'Time Entry'.Contract and then this Value is been compared to ComboBox Selected value.
 
If you want to do a Patch, we can use the same formula as a value for specific attribute:
 
Patch(DataSourceName,Defaults(DataSourceName),{FieldName: Lookup(Choices('Time Entry'.Contract), Value= ComboBox.Selected.Result)})
Hope this Helps!

View solution in original post

5 REPLIES 5
Dual Super User
Dual Super User

Re: IsSearchable not working on Filtered combobox?

Hi @Amaga 

 

I tried to reproduce it and it seems like the issue exists for combobox.
 
As a workaround, you can create a collection and refer the value from that newly created collection into the combobox, this allows searching on the collection even though a filter is applied.
 
You can create this collection either on Page "OnVisible" or App "OnStart" property. Also, you can create the whole list in collection and then do a filter on Combobox. 
 
Expression:
 
ClearCollect(MyCollection, SortByColumns(Filter([@Contract], Active = "Yes"), "Title", Ascending).Title)
Combobox Items: MyCollection
OR
ClearCollect(MyCollection, [@Contract])
Combobox Items: SortByColumns(Filter(MyCollection, Active = "Yes"), "Title", Ascending).Title)
 
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Community Support Team
Community Support Team

Re: IsSearchable not working on Filtered combobox?

Hi @Amaga ,

 

What is the column type of this combo box column? Is it a multiple value enabled lookup column? If so, then you do not need to modify the combo box, it will automantically show options from the source list. If it's not a lookup column, and you want to update this column with data from another list, then you will need to add this other list also as the data source of this app. And then it's better to use a Patch function to update the item, instead of SubmitForm function. 

 

But first, you need to confirm what is the original column type of this field. 

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Amaga
Level: Powered On

Re: IsSearchable not working on Filtered combobox?

Hi,

 

It is a lookup column. The lookup column is called "Contract" and refers to another custom list "Contracts". In the combobox, the default formula for Items is Choices('Time Entry'.Contract). This allows me indeed to show all items of the Contracts list and allows the IsSearchable option to work and filter items in this list.

 

However I want to filter this list by active Contracts. Active is a flag on the Contracts lists, so before showing options in the combobox, I want to filter them. Therefore I added an additional Source for this app called Contracts, which I then filter accordingly: SortByColumns(Filter([@Contract], Active = "Yes"), "Title", Ascending).Title) as the Items formula for the Contract combobox on the Time Entry form.

 

This has two issues:

1. I can't use the IsSearchable option (the suggestion of @yashag2255 above did solve this issue)

2. the value of the selected contract doesn't seem to be registered on submit (the suggestion of @yashag2255 above did not solve this issue)

 

To conclude: what is the best way to filter the possible choices of a combobox lookup column? I've been trying to find a working solution for days now. I can't believe why this is so had in Power Apps...

 

 

 

 

Dual Super User
Dual Super User

Re: IsSearchable not working on Filtered combobox?

@Amaga 

 

To update the field based on selected combobox value, you need to modify the "Update" property of your DataCard which holds this combobox control.
 
Lookup(Choices('Time Entry'.Contract), Value= ComboBox.Selected.Result)
 
This will pass the reference for Lookup field. Here, I am doing a filter on the choices of 'Time Entry'.Contract and then this Value is been compared to ComboBox Selected value.
 
If you want to do a Patch, we can use the same formula as a value for specific attribute:
 
Patch(DataSourceName,Defaults(DataSourceName),{FieldName: Lookup(Choices('Time Entry'.Contract), Value= ComboBox.Selected.Result)})
Hope this Helps!

View solution in original post

Amaga
Level: Powered On

Re: IsSearchable not working on Filtered combobox?

Thanks @yashag2255  this seems to have done the trick:

 

1. Populate a collection on start: ClearCollect(ActiveContracts, SortByColumns(Filter([@Contract], Active = "Yes"), "Title", Ascending).Title)

2. Link the collection to the combobox: Items = ActiveContracts

3. on Update of the datacard: LookUp(Choices('Time Entry'.Contract), Value = DataCardValue4.Selected.Title)

 

To me this seems a work-around and something Microsoft should work on to make this functionality much easier!

 

Thanks for your input!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,872)