how to filter datatable without using filter datatable activity? as i am using uipath version earlier than 2018.02 so there is no “filter datatable activity”
You have to use DataTable.Select(filtercondition)
I am using the Select method e.g DT_Temp.Select("[Airline]= "+ varAirline).CopyToDatatable
still giving error “Column not found”
‘varAirline’ is this a number or string?
Its string variable
Try this DT_Temp.Select(“Airline='” + varAirline + “'”)
Tried but its still giving same error : Assign : Cannot find column [’AF’].
Actually AF is value of my varAirline variable.
Got it. A small mistake in the select filter.
DT_Temp.Select(“Airline=” + “'” + VarAirline + “'”)
hi karthik
its also not working
pls giv specific code
m also struggling with same kind of scenario
Thanks
Make sure your data table contains headers. Else Select method won’t work.
Consider,
Data table is dt
Column to filter is Column1
Value to filter is searchValue
Use the following expression,
dt.Select("Column1='SearchValue'")
did the same but all in vain bro
I also used filter datatable activity also bt that’s also not working
don’t know wat to do
DataTableAutomation2.xaml (11.7 KB)
strData1.xlsx (13.4 KB)
Okay. Let me check your attachments.
what is your filter condition?
Hi
I have shared the flow and excel as well
first m reading the data by read range then putting assign activity lik s=dt.select(“Region=”+“'”+East+“'”)
like that
then I want to write the data into another sheet
how sud I do that?
showing this error
thanks
Can you please tell what is exact filter condition that you are looking for. from the image i can see that East is not declared as a variable.
Please use below code and let us know it is working or not.
TableDT.Select(“[Region] = ‘East’”).CopyToDataTable
Regards,
Vijay.
I change the flow and attached the file. please change the Excel File path in excel scope activities in both places.
The condition what i am check for is DTs.Select(“Region = ‘East’ or Region = ‘West’”).CopyToDataTable and writing same back to the excel sheet2.
Please check and let me know if this solved your problem or not.
DataTableAutomation2.xaml (12.1 KB)
strData1.xlsx (12.4 KB)
Regards,
Vijay.
thanks Vijay.
it worked.but with “and” condition its giving some error and
not providing the excat output.
East is not declared as variable ===means ???
I didn’t get u bro.
actually my requirement is to filter the excel sheet based on column values.
lets say I want only item = pen and pencil.
thanks
m facing issues with filter data table activity as well
not able to filter data with that activity.
pls help me on this
don’t know the excat reason
except east and west m getting central as well in new sheet
see on same column you can’t put Multiple Conditions with And. Generally if you have to select multiple values from same column then you have to use OR condition. If you have to select multiple values from Multiple columns you can use AND condition.
Regards,
Vijay