Hello - my BluePrism is dead today so please try this:
Create Data Items:
SQL Command (text)
FilterValues (text)
Comma position (number)
1. Multi Calc:
a) SQL Command = [Collection.Column] & " LIKE " 'beginning of SQL Command
b) FilterValues = [Collection.Values] 'will be used for calculation
c) Comma position = InStr([Collection.Values],",")'will be used for calculation
2. Decision stage:
Comma position = 0 ' if there is no more comma that means this is last value to filter
IF YES path
Multi Calc:
a) SQL Command = [SQL Command] & " OR " & Left([FilterValues], [Comma position] - 1) 'take string which is before commna (-1)
b) FilterValues = Mid(FilterValues,[Comma position] + 1, Len(FilterValues)) 'erase used value (+1 to skip comma)
c) Comma position = InStr([Collection.Values],",")'will be used for calculation
Go back to Decision Stage
IF NO path
Multi Calc:
1) SQL Command = [SQL Command] & " OR " & [FilterValues]
2) SQL Command = Replace( [SQL Command], "LIKE OR","LIKE" 'in sql command it will be LIKE OR which is incorrect so use replace to enter correct value
Filter Collection using SQL Command