Hello!
I have a canvas app with a sql table as the primary source and a Sharepoint list for combo box options.
On app start, I create a collection titled reference from the Sharepoint List. In the reference collection, there is a column titled PrimaryCaseType. This column contains 9 rows of text values.
In the EditForm of the canvas app, I have a multi-select combo box (cmbCaseType) that points to the PrimaryCaseType column in the reference collection. On Update, the selected value(s) write to a SQL database column, Primary_x0020_Case_x0020_Type. If a user selects multiple case types, the selections are stored as comma separated values. (Side note: I have since learned my lesson on spaces in sql field names)
Now the issue...
I am trying to filter records in a Browse Gallery by using a multi-select combo box for Case Type (cmbCaseTypeFilter).
For records that have multiple case types (comma separated values in SQL), I want the gallery to return records where any values match what is selected in the combo box.
Example: Record 1 case type = blue, Record 2 case type = blue, green. When a user selects blue in the cmbCaseTypeFilter, I want both cases to appear in the Gallery; if a user select green in the cmbCaseTypeFilter, I only want record 2 to appear.
In the Items property of the Gallery I have the following:
Filter(Primary_x0020_Case_x0020_Type in cmbCaseTypeFilter.SelectedItems.PrimaryCaseType || IsBlank(cmbCaseTypeFilter.SelectedItems.PrimaryCaseType))
The filter correctly returns records that contain a single entry in the SQL Primary_x0020_Case_x0020_Type column but omits all records that contain comma separated values, even when the filtered selection matches one of the values for that record.
I have also tried the following:
Primary_x0020_Case_x0020_Type in Concat(cmbCaseTypeFilter.SelectedItems, PrimaryCaseType & ", ") || IsBlank(Concat(cmbCaseTypeFilter.SelectedItems, PrimaryCaseType & ", "))
and
If(Not(IsBlank(cmbCaseTypeFilter.SelectedItems.PrimaryCaseType)), Trim(Primary_x0020_Case_x0020_Type) in Concat(cmbCaseTypeFilter.SelectedItems, PrimaryCaseType & ", "))
These did not work either. Any help is GREATLY appreciated!
@AhmedSalih
@WarrenBelz