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

Filter combo box based on different columns, while also supporting delegation

Hi!

 

I have a sharepoint list, with the following columns: email, TestData (choice), and Archived (boolean).

I have a dropdown in a form, where I want to display the records, where TestData is set to "False", and Archived is set to false. To do this, I set the "item" property to the following:

 

 

Filter(Employee, Archived = false And TestData.Value = TesterValue)

 

 

And this works fine, but it cant be delegated. If I set the data row limit to 1, only the first element is visible (IsSearchable is set to false).

 

How can I make this work? If I enable searching,  I get the following error:

AkosMakovics_0-1632749377764.png

 

The fields are set up properly:

AkosMakovics_1-1632749428251.png

 

How can I filter the combo box, and maintain delegation?

 

Update:

I would be able to make it work with the following code: 

ComboBox1.Items =

 

 

Filter(Employee, Archived = false And TestData.Value = TesterValue And StartsWith(email, ComboBox1.SearchText))

 

 

This way, even if a record is not displayed initially, because it is outside the delegation limit, when I start to type it into the search text, it will appear. But the search is not working because of the error. Why is the error there?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @AkosMakovics ,

Yes, it would help enormously - the whole filter is then Delegable .  . I have a blog that may assist

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

5 REPLIES 5
WarrenBelz
Super User
Super User

Hi @AkosMakovics ,

You have a circular reference - you have the Items based on the combo box itself at the end (this will run in circles)

StartsWith(email, ComboBox1.SearchText)

Also Boolean (yes/no) fields are not delegable if used with another filter.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Thanks for the reply @WarrenBelz!

It is still not clear for me. If I use the Boolean field alone, it is still not delegable. I have tried several methods:

Filter(Employee, TestData.Value = TesterValue)

Filter(Employee, Archived = false)

Filter(Employee, Gender = "Male")

 

Non of them is delegable when used in a combo box (they work fine in a gallery or table). Is it even possible to filter a combo box?

@AkosMakovics ,

Yes you can filter a the Items of combo box, but when you add a whole table, you will get a Delegation warning on the Search function it you have it turned on as Search is not Delegable. Try this

With(
   {
      wList:
      Filter(
         Employee, 
         TestData.Value = TesterValue &&
         Gender = "Male"
      )
   },
   Filter(
      wList,
      !Archived
   )
)

Note that the top filter needs to return record numbers less than your Delegation limit.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

@WarrenBelz Thanks!

The top filter will return more than the delegation limit (the sharepoint list is big). Would it help, if I convert the boolean and choice columns into a text column? 

Hi @AkosMakovics ,

Yes, it would help enormously - the whole filter is then Delegable .  . I have a blog that may assist

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,510)