@ChrisChong
Filtering with a fixed number of parameters is not complex. You can use contains operator for searching for a substring, eq operator for exact match, single quotes around string values, etc.
contains(cra31_lastname, 'David') and cra31_region eq 60100012
But it can get complicated if the search parameter is dynamic and if you need to build your filter rows parameter only based on the Filters entered by the user. (e.g. the user enters Facility, Last Name and Region but leaves the other filters empty).
In that case, I recommend using Compose steps to build your Filter Rows parameter first.
In the example below, the following expression concatenates the Facility, City, Last Name and Region field names with the parameter values if the parameter value is not null.
concat
(
if
(
equals(triggerBody()?['text'], null),
'',
concat
(
'contains(cra31_facility, ''',
triggerBody()['text'],
''') and '
)
),
if
(
equals(triggerBody()?['text_1'], null),
'',
concat
(
'contains(cra31_city, ''',
triggerBody()['text_1'],
''') and '
)
),
if
(
equals(triggerBody()?['text_2'], null),
'',
concat
(
'contains(cra31_lastname, ''',
triggerBody()['text_2'],
''') and '
)
),
if
(
equals(triggerBody()?['text_3'], null),
'',
concat
(
'cra31_region eq ',
triggerBody()['text_3'],
' and '
)
)
)
The expression above will have an extra " and " at the end, so you might need another Compose step to truncate the last x5 characters.
if
(
empty(outputs('Compose')),
'',
substring(outputs('Compose'),0,sub(length(outputs('Compose')),5))
)
The end result will look something like this. (Facility, Last Name and Region values were entered but the City was empty).
contains(cra31_facility, 'Power') and contains(cra31_lastname, 'David') and cra31_region eq 60100012
