How to Change Type Argument Property for For Each in current version of Studio (2023.4.0)

How to Change Type Argument Property for For Each in current version of Studio (2023.4.0)? I am working on a Document Understanding Project and dealing with Data Set, I need to change Type Argument as DataTable. In current version I have no option to change that.

UiPath.System.Activities (22.10.4) version has this option available, however I am looking for solution in current version.

Any help is highly appreciated.

image

@Arijit_Sarkar

In 23.4 as of now ypu cannot change type argument in for loop…as you dais your option is to use 22.10

Or

Inside the loop use .Cast method and cast the object to required type and then use it

Hope this helps

Cheers

Thank you Anil! I never used cast method, but I will definitely try. Would it be possible for you share any reference or screenshots.

Warm Regards,
Arijit

@Arijit_Sarkar

If you want to cast to dataset use str = objvar.Cast(Of Dataset) you need to provide the type to which you need to convert to…the same you select in type argument shpuld be written directly inside the cast(Of variabletype) you can use it in assign and create a variable of required type and assign it to that variable (str as in example)

Hope this helps

Cheers

Excellent! It worked.

image

1 Like

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