Hello, I am not proficient at the .Net VB language in UiPath and need some help. Currently, this is my statement:
I’m using an assign activity to create a new Datatable: here is the select statement, dtDB.Select(“[BACHNUMB] like WS”).CopyToDataTable
BACKNUMB would be the header to the column I need to gain the data from. There are other data in the column that start with other prefixes than WS, so I used a “like”. When I ran the debug on this activity, it claimed the Assign couldn’t find the Column “WS”. Clearly I have something wrong.
first the reason why we got that error is we mentioned like
dtDB.Select(“[BACHNUMB] like WS”).CopyToDataTable
WS as term that would become column name rather than a value as it is not between single quotes
so mention it within single quotes and try buddy
it will work for sure, like this dtDB.Select(“[BACHNUMB] like ‘WS’”).CopyToDataTable
in that case better use Filter datatable activity @Sara_Car
–you can mention the datatable name
–mention the column name between double quotes as string
–the value as string as well and set the condition as CONTAINS
kindly try this and it will work for sure buddy
for more info on filter datatable activity https://activities.uipath.com/docs/filter-data-table
Cheers