I have a datable with N number of column , also I would get the input in string in the format “aa,bb,cc,ef” - Now I need to Keep only given string value from fixed column ( col 0) and remove the other rows.
eg:
inputdt
aa 12 89 er
ey 29 88 23
cc 03 38 jf
expected output aa 12 89 er cc 03 38 jf
Note : String input is dynamic and it might also not be available in data table, eg count of rows will be 0
Could you please share some suggestion to solve it - Thanks
Hope you are getting the input as a list. If yes, use a “for each activity” to loop through the list and then inside that use the filter datatable activity. Then in the activity you can create the condition and select whether keep or remove based on your requirement.
So it will help to filter the input datatable based on the list of string that you used in the loop.
@Fresher filterWithStringValue.xaml (12.4 KB)
check out this workflow I have written for you. You have an input string with the commas between each item. So, I split your string and store each item into an array. arr_string = Split(str_input,“,”)
Then I loop through your data table and if arr_string does not contain the data table’s col0, I remove that row and output the result data table. I hope it helps.