I have a excel with 3 columns consider Message, Technician, Severity and i need to filter based on message column.
The condition is message column might contain certain keywords and the filtering on the message column needs to be done on those keywords irrespective of the case.
Used filter datatable activity and getting the result by using “or” condition for the same (message)column, but i need to do it without filter datatable activity as it is time consuming and unable to perform ignore case. is there any other way to do this?
well we can use select method in that case buddy
if your datatable is stored in a variable named out_dt then with select method like this, Final_dt = out_dt.Select("[Message] = ‘your keyword’ ").CopyToDatatable()
or
Final_dt = out_dt.Select("[Message] like ‘%your keyword%’ ").CopyToDatatable()
This would work similar to Filter datatable activity buddy and is more reliable and faster as well
Cheers @karthik_A
in that case we can mention like this Final_dt = out_dt.Select(“[Message] = ‘your keyword1’ or [Message] = ‘your keyword2’ or [Message] = ‘your keyword3’ or [Message] = ‘your keyword4’”).CopyToDatatable()
Hi @Lahiru.Fernando ,tried with the steps mentioned by you but the workflow doesn’t seem to get into the IF condition while debugged. attaching the XAML for reference.
Great
remove the single quotes buddy
we need to mention only [tyr] - if its a column name
or
if its a value of a column remove the brackets and mention as ‘tyr’ alone
Cheers @karthik_A
@Palaniyappan missed out the quotes somewhere redone the condition and it is working fine now…
Adding to the above solution … is there anyway thge keywords can be considered irrespective of the case?
if possible to filter based on keyword irrespective of the case that would be helpful…
Great
Yes of course thats possible
before using this assign activity with a select method use another assign activity before this
like datatalename.CaseSensitive = True
this will set the casesensitivity of the table whether to take or not
then use a assign activity with the select method
for more info on this