cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
_sigmaNot_
Regular Visitor

Combo Box Errors with SearchItems property

Hi everyone,

 

I've spent the majority of the day trying to figure this one out, unfortunately haven't found a solution...

 

I have a combo box (Students) with a Collection as data source.

The collection is dependent on the selection from another combo box (Sites) and I rebuild the collection in the OnChange property of the Sites combo box.

The collection works fine but the Students combo box doesn't show any entries when I click on it, and it is showing 2 errors with the SearchItems property, but when I click on the error it takes me to the DisplayFields property and I see nothing wrong...

If I change the IsSearchable property of the Students combo box to false the errors go away and the collection populates as expected, but the list can go up to almost ~1,700 entries for some sites and the search feature is an absolute necessity in this case.

 

 

Here are some screenshots:

 

formula to build collection on Sites combo box OnChange propertyformula to build collection on Sites combo box OnChange property

 

2 Formula Errors in the Sites combo box2 Formula Errors in the Sites combo box

Unexpected characters error detailUnexpected characters error detail

invalid number of arguments error detailsinvalid number of arguments error details

 

 

Display Fields and Search Fields on Students combo box.  All are text fieldsDisplay Fields and Search Fields on Students combo box. All are text fields

 

 

Any help is appreciated 🙂

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @_sigmaNot_ ,

I may be guessing here, but one issue I can see is that the two possible collections are not the same - one contains a

ClearCollect(
   colStudents,
   If(
      IsBlank(cbox_School.Selected),
      AddColumns(
         Filter(
            'cmu.vw_ActiveStudents’,
            Title = Blank()
         ),
         "Displaylnfo",
         ""
      ),         
      AddColumns(
         Filter(
            'cmu.vwActiveStudents', 
            SchoolID = cbox_School.Selected.SchoolID
         ),
         "Displaylnfo", 
         LastName & ”, " & FirstName & " " & Proper(MiddleName) & " | " & Grade
      )
   )
)

DisplayInfo field and the other one does not. You cannot add the column to "Defaults" as this is a single record, but if you had one blank record in the Table, (I have used the Title field as an example), you could try this and see if that helps all the errors.

 

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.

Visit my blog Practical Power Apps

View solution in original post

3 REPLIES 3
_sigmaNot_
Regular Visitor

Correction:

The caption on the 2nd screenshot should read...

2 Formula Errors in the Students combo box

Hi @_sigmaNot_ ,

I may be guessing here, but one issue I can see is that the two possible collections are not the same - one contains a

ClearCollect(
   colStudents,
   If(
      IsBlank(cbox_School.Selected),
      AddColumns(
         Filter(
            'cmu.vw_ActiveStudents’,
            Title = Blank()
         ),
         "Displaylnfo",
         ""
      ),         
      AddColumns(
         Filter(
            'cmu.vwActiveStudents', 
            SchoolID = cbox_School.Selected.SchoolID
         ),
         "Displaylnfo", 
         LastName & ”, " & FirstName & " " & Proper(MiddleName) & " | " & Grade
      )
   )
)

DisplayInfo field and the other one does not. You cannot add the column to "Defaults" as this is a single record, but if you had one blank record in the Table, (I have used the Title field as an example), you could try this and see if that helps all the errors.

 

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.

Visit my blog Practical Power Apps

@WarrenBelz

I ended up setting the Student combo box to disable when no school is selected and then add the DisplayInfo column within the Items property of the combo box.  I opted for this approach as the user shouldn't be able to interact with the Student combo box until after a school is selected.  This worked for me!

 

Was curious about your solution so I tried it and can confirm it works as well!

 

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,865)