(@aksh1yadav, @arivu96, @KarthikByggari, @Karthick_Settu, @ClaytonM, @pathrudu, @PrankurJoshi, @Priya_Pandey, @Divyashreem, )
I have a datatable (let’s say dtA) which has 10 columns and 1000 rows with various values (Columns are:- Server name, OS version, Path, Port name, etc)
And as I mentioned, there are 1000 such rows.
Now from the datatable I want to filter it such that this dtA is divided into two different datatables (dtB and dtC).
The criteria is :-
if (OS version contains “Windows”, “MIcrosoft”, “MS”, etc) then add this data (all the details Server name, OS version, Path, Port name, etc) needs to be entered into dtB
if (OS version consists “Redhat”, “Sun”, “Linux”, “Kali”, “Ubuntu” etc ) then add this data (all the details Server name, OS version, Path, Port name, etc) needs to be entered into dtC
I have performed this operation as below:-
build data table dtB and dtC (I already have dtA in hand)
for each row in dtA
if (row(1).tostring = “MS”, “Windows”, etc) then add a new datarow and enter each row (each and every detail into dtB using assign activity)
else if (row(1).tostring = “Redhat”, “sun”, etc) then add a new datarow and enter each row (each and every details into dtC using assign activity)
Now, as I mentioned, there are 1000 rows, but there might be 100000 or more rows, and using a for loop is not very convenient for me.
I also know that I can directly use filter data table activity to input dtA and output a dtB
and another filter datatable activity where I input dtA and output a dtC
But I need to know how do I mention the Column name and value pair in the filter datatable and retrieve the dtB and dtC directly.
I need to put in the filter datatable activity as dtA.columns.contains(“MS”) or dtA.colunms.contains(“Microsoft”)
because the actual value cell might contain (MS sql server verisio bla bla bla) instead of just “MS” in that cell
or it might contain (Windows server 2008 r2 bla bla bla) insteaad of just “Microsoft”
Please help, Its urgent,
Thanks and Regards,