How to assign a varible in contain

Hiii everyone,


I want to check if the value in casenumber variable exist in the specified datatable if exist the proceed

Thanks and Regards,
Supriya

Hi @supu123

To check whether a specific value exists in a datatable, you can use the Output Data Table activity to convert the data table to a string.
Then you can use Contains function to check for the value. Check my workflow below.

image

If this works for you, please mark the answer as the solution so it will help others as well :slight_smile:

@Supu123

If you want to check whether the datatable is having expected value. then you can follow as mentioned below.

Let us take you are having a datatable dta and you want to check strb in dta

Then use below query in Assign Activity
boolFound= dta.Select().Any(Function(x) string.Join(",",x.ItemArray).Contains(strb))

boolFound will be True if the datatable contains value else False

Regards,
Mahesh

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.