Could not find member "CurrentIndex'in type "https://schemas.uipath.com/workflow/activities:foreach(String)'

Hi Guys,

I am facing this following error
Could not find member "CurrentIndex’in type "https://schemas.uipath.com/workflow/activities:foreach(String)'.
where i created my workflow in 2019.5 community edition and trying to import the same in
2018.1.4 Enterprise version.

i have gone through this link Could not find member 'CurrentIndex' in type 'http://schemas.uipath.com/workflow/activities:ForEach(String)'. Row: 95, Column: 64 - #8 by sangasangasanga but it doesnot work for me

is there any way to resolve this error?

@Abisha

Go to Manage Packages-> Project Dependencies and show me screenshot once. Need to check once what are the Packages you installed for this process.

Hi @Abisha

Maybe 2018.1.4 version doesn’t support using CurrentIndex immediately,
So you could try to use following method instead of using CurrentIndex.
For Each:
CurrentIndex = Array.indexOf(array, value)
For Each Row:
CurrentIndex = DataTable.Rows.indexOf(row)

Hi
we need to change the version of the packages to the current one
If that is done in design tab → manage packages → project dependencies with activity packages downgrade the version and try once

Cheers @Abisha

image

this is in my CE latest version.

I did that also but still the same error , mainly for me for each and for each row activities are throwing error

Hi,

I tried this also its giving me different error say ‘Array.Index’ is an unexpected token.

Hi @Abisha

Please refer to the following sample.

Actually my concern is, My code was developed in 19 version my Enterprise version is 18.1.4 so when i import all the foreach and for each row activities are not getting loaded since the Uipath core activities has been splitted as two Uipath system activity and Uiautomation activity

@Abisha

As you used latest version of Uipath studio to develop the process and trying to move old version of Uipath studio. And also it won’t support backward compatibility as we get many new features in latest versions and same you won’t find it in old version.

If possible update Uipath studio and then try once.