Check this , you will find the solution .
Thanks for quick reply …but i want only one column value …and with above select statement i guess it return all column value depending upon match condition
Between single quotes ’ ’ , you can pass your value that you want to check and it will return the row in which your particular column is matching the condition . Here column- will be your column name .
Try like this
iterate Datable through for each row
If row(“col2”).Tostring = Value
then flag = 1
if flag = 1
assign requiredValue = row(“col1”).Tostring
End For Each
Thanks for this …but i want to achieve it with select statement
DataTable = DataTable.Select(“[Column Name] = ‘Value’”).CopyToDataTable
i dont know what exact wrong i am doing. please find my wf.
i want depending upon department name i want to find all member present in it.Department List.xlsx (8.0 KB)
Main.xaml (21.0 KB)
Change the filterData datatype from datarow to DataTable.
I have mentioned data table here !!
yes, sorry for that . but still it give me all column matching data . I want only one column.
In my case i want only Employee name . and o/p coming is Employee name & department.
Using for each row i can filter it out. but my expectation is that with only select query i get employee name only
You can use one of it accordingly to get your desire value.
thank you so much for replying.
I will reframe my requirement.
Dept | EmpName
A | xyz
A | pqr
A | RST
B | hij
Is it possible with select query that by passing dept name i will get all employee name present in it.
ex. if we pass A , then o/p will be
with simple select query it gives Dept name and Employee name
A pqr like wise ,i can filter out using for each . but just for knowledge i want it using select query if possible
DataTableFilter.xaml (9.5 KB)
The activity used in this workflow is Filter Data Table, with specific Column output defined.
I understood your requirement, you want to access the particular data without for each loop.
I will try step by step-
- firstly you have to select the rows which are having your department name.
- now you will be having a datatable , which is only having your particular department name and employee.
- now you can access any row or cell using
You can pass row and column here
yes ,i really appreciate your response , but i want all name so after using select statement i get
but to get only (xyz ,pqr,RST) i have to use again for loop in above dt and get all values row(1).toSrting
But i want that is it possible with select statement that i will get directly all emp, name only.
Sorry for troubling . i want to find out is their any select statement to avoid for loop
sorry @hermawan ,this is not what i want . please see my latest reply hope you will get idea .thanks
Check this , it’s similar with your solution .
Just “department” is replace by “country”
thank you so much.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.