Hi,
I want to change type argument of Object to datatable but there is no option showing in studio. Can anyone help me to change argument type.
Property section is missing for - FOR EACH activity.
Hi,
I want to change type argument of Object to datatable but there is no option showing in studio. Can anyone help me to change argument type.
Property section is missing for - FOR EACH activity.
In latest vesion,We heard that For Each Activity has no TypeArgument Property and it will Automatically Pick TypeArgument. But sometimes it is not working as we excpect. Then, what is the Solution ?
๐๐จ๐ฅ๐ฎ๐ญ๐ข๐จ๐ง :
๐๐๐ฌ๐ ๐ : CType(Value_Object,Target_Datatype)
๐๐๐ฌ๐ ๐ : DirectCast(Value_Object,Target_Datatype)
For Clear Information, You can see the below image.
or downgrade the version
Hi
With modern activities we donโt need to mention
Just the value of list of items field must be a collection of homogenous object
It will pick things automatically
Only if you are using windows legacy project we get that option of mentioning the TYPE ARGUMENT
Check with the example from UiPath docs as below
https://docs.uipath.com/activities/other/latest/workflow/for-each#example-of-using-the-for-each-activity
Cheers @Jeeru_venkat_Rao
I have dataset datatype and want to convert it into datatable. I tried your method but not working. Can you share it if possible.
I want to write data into excel.
As a workaround, can you try to downgrade UiPath.System.Activities package to 22.10
you will get collection of data tables by using above method
Do one thing take assign activity inside for each
left side
take a variable of data table
right side
Directcast(currentitem,system.data.datatable)
then use write range and give the data table variable
Hope this helps
The For each property of Type argument is in the older versions of the For each activity.
If you want to make sure to use the Type argument in the properties of for each.
Then downgrade the version of UiPath.System.Activities package. Then only you can find the Type argument option in properties.
Note - By Downgrading the package it will effect the activities which are in the UiPath.System.activites package.
Hope it helps!!
myDataSet.Tables.Cast(Of DataTable)
as mentioned above in the first aid. You can stay with your origin package version when applying this forcement / helper
Thank you @Usha_Jyothi .
Its workingโฆ
Happy automation
Usha
Thank you PPR & Mahesh for your help.
You donโt do the DirectCast in an Assign. You do it in the For Each activityโs โList of itemsโ
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.