How to find the Datatype of items

Hi All,
I am trying to get the data type for all the items in for each activity, but don’t know how to do so?
Kindly suggest me a solution.


Thank You In Advance,
Regards Charan.

1 Like

@Charan022, one solution could be to use regular expression to check what value the item stores.

1 Like

System.Text.RegularExpressions.Regex.IsMatch(“string”,"[0-9]")

Reference: Check if value contains a number

1 Like

Hi
Inside the for each loop use a writeline activity like this to get the datatype of the variable we get
items.GetType.ToString

But make sure that you have a value in that variable

Cheers @Charan022

1 Like

@Palaniyappan Thank you so much,
I have completed it with “Char.IsDigit(item)” function to get only the Integer Datatype and working Fine.

Thank you @sumitd