I need help with search function in grid gallery control.
I have designed student records grid cell table using gallery.
I am providing search and sort capability to user to search student record using search field under each grid column and also sort individual column in ascending or descending order.
I have search text field under every column of Gallery grid so user can search student details using name, age, sex, country, etc.
I am using search function in nested form so that user can search based on one column and then also filter/search second column criteria and can search/filter on third column, and search on fourth column, etc.
Example:
Search scenario:
User gives Student Name = Student_A --> Outcome Student_AA, Student_AB, Student_AC
User gives Age = 18 --> Outcome Student_AA, Student_AB
User gives Sex = F --> Outcome Student_AB
I am also using 'sortbycolumn' function to allow user to sort each column (before or after search results) using icon on each grid gallery column.
The below code works when I use Text type column from dataverse data table.
Whenever I am using Numeric column or choice column or data/time column from dataverse table in search fields code, I get following error:
"The function 'search' has some invalid arguments"
I am using following function:
SortByColumn(
Search(
Search(
'Mydataversetablename',
Txtbox_Search_Name.Text, //Search Student Name --Text Field in Dataverse table
"std_name"
),
Txtbox_Search_Country.Text, //Search Student Country -- Text Field in Dataverse table
"std_country"
),
Txtbox_Search_Std_Age.Text, //Search Student based on Age -- Numeric field in Dataverse table
"std_age"
),
Txtbox_Search_Std_DoB.Text, //Search Student based on Date of Birth -- Date/Time field in Dataverse table
"std_Date_of_Birth"
),
Txtbox_Search_Std_SeX.Text, //Search Student based on Sex -- Choice field in Dataverse table
"std_sex"
),
Sort_Column_Name,
Sort_Direction_A_D
)
I am using following code in ITEMS of my gallery grid:
I tried combining Search and Filter code however I could not get 'right' result when user gives input in text field so I tried to solve it using search function only.
Any suggestion or ideas to update/change my code to provide search function for each columns and also allow user to sort each columns independently.
I want to give search capability to user under each column (using text box for search text) of the student gallery grid and allow user to combine multiple column search field together.

