I am attempting to use an SQL connection to populate the items in a combo box. It will display a list of ID numbers for the user to choose from, and write the selected value to an excel table once the form is submitted. I also want to display in adjacent labels the first name and last name of individuals associated with the ID number so that the user can confirm that they made the right selection.
I am able to populate a combobox control using this formula:
ITEMS = BIOGDATA.STUDENT_ID
DisplayFields = ["STUDENT_ID"]
SearchFields = ["STUDENT_ID"]
The name of the SQL table is BIOGDATA and the column I want to select values from is STUDENT_ID. This successfully populates the combo box with the ID numbers I want, but, for some reason when I try to set the IsSearchable property to true, it immediately reverts back to false. This is essential because there are nearly one million rows of IDs that users need to wade through.
I thought I would try making my own search box by adding a text input control set to accept numerical values, and then filter the combo box using the text input.
Items = Filter(BIOGDATA.STUDENT_ID, Text(StuID_TextInput.Text, TextFormat.Number) = STUDENT_ID)
However, this results in an error because I am comparing a text value to a numerical value, even though the text input control's text format is set to TextFormat.Number and I am converting the input text to a numerical format in the formula. How do I resolve this?
I am hoping the solution will also allow me to add labels that display the associated student first names and last names for the selected ID. I'm also having issues there because those are record values and I am trying to display them as text.