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 property
2 Formula Errors in the Sites combo box
Unexpected characters error detail
invalid number of arguments error details
Display Fields and Search Fields on Students combo box. All are text fields
Any help is appreciated 🙂
Solved! Go to Solution.
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
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
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!
User | Count |
---|---|
256 | |
108 | |
97 | |
51 | |
39 |