Error 'Append' is not a member of 'System.Array'

UiPath Studio gets updated from 2021.2.0 to 2021.4.0 and then it is showing the error
‘Append’ is not a member of ‘System.Array’ i used in a linq query.
It is working fine in the previous version but showing error in latest version.

Please suggest a way to solve this error.

Hi @Swara_Soni
can u show the linq query u had used please

it might be due to since u are adding elements to an array which is not possible

Regards,
Nived N
Happy Automation

Hi @NIVED_NAMBIAR

(From d In dtInput.AsEnumerable
Group d By k=String.Join("",arrGroupCols.Select(Function (kr) d(kr).toString).toArray) Into grp=Group
Order By dtInput.Rows.IndexOf(grp.First())
Let res = dictMaster(grp.First()(“Development By”).toString & grp.First()(“Action to be Taken”).toString)
Let ral = grp.Select(Function (pg,i) pg.ItemArray.Append(If(i = 0, res,“ROUTING-0009”)).toArray).toList
Let drl = ral.Select(Function (dr) dtOutput.Rows.Add(dr)).toList
Select drl).Count

This is my linq query

The query is working fine in one machine of older version but showing error in another machine having new version installed

Hi @Swara_Soni
can u share the xaml file if possible ?

@NIVED_NAMBIAR
The linq query is explained in the topic i am sharing below:

The .xaml file is shared by @ppr in the solution.

if this a version based issue, then i am adding forum leads @loginerror or @Pablito to take a look.

1 Like

can you check that System.LINQ is imported by namespaces

1 Like

@ppr Yes, it is present there
import

@ppr

Do you have any other way out for this situation ?

Hi @Swara_Soni,
I asked proper team to take a look on this.

1 Like

@Pablito Thanks for response

Will be a great help if this gets solved …

@Swara_Soni
Lets assume
on one Machine the process can be executed on another IT fails.
On the Machine which executes WE can Check in Studio the Code and there ist no validation Message. So Statement ist accepted

If so, WE would search the issue Not within the Code and Note in the Infrastruktures e.g. package references /.net

Just create an new process Version
Deleted in the failing Machine the old one from Nugget Store and deploy the new process.

The Idea on this is to force the dependency fetches and Cache Updates

Still If the process again is failing with this exception then WE should dig more for a valid Nugget repos Content

Rewriting the append with an alternate Like a concat… Would bei possible. But AS These Statements are also based on the Linq Infrastrukturen WE would risk to repair on the wrong parts. Still WE do feel that the issue comes from Infrastructure

Let ist know the result from process redeployment. Thanks

@ppr Thanks for the response.

I tried removing the data from .nuget folder, and reinstalled UiPath then created new process but it is giving the same error.

Is there any other option to run the linq query ?

@Pablito @ppr
Have you found any solution for this problem, because the problem only exists UiPath Studio version 2021.4.0 and i don’t have the .exe file of UiPath Studio version 2021.2.0.

@Swara_Soni
As mentioned we would further recommend to analyzer the Infrastructure.

Log in to your Cloud orchestrator
Maybe you have to Switch Back to the Automation Cloud
Right Side on the resources you will get current and alternate Setup files

once the infrastructure / setups are renewed on the other machine we recommend it to create a modified Hello Bot for testing this failing part isolated

alternate to append could be:
grafik

Hi @Swara_Soni

Could you confirm whether this also happens on a new project?

Hi @loginerror

Thanks for asking …
I tried to run “itemArray.Append” in new workflow on the same machine and there also it is showing the same error.

Have you already tried to update all activity packages to their latest preview versions?
I’ve opened your XAML file from the post you’ve attached above and it looks to be working on these activity packages that were downloaded by default:
image
(the crucial package here would be the System one I suppose)

Thanks for the response @loginerror

All the packages are already updated to their latest preview versions in Studio version 2021.4.0 …
Can you please share which Studio Version you have tested the .xaml file? …as in my case it is showing error in version 2021.4.0 and running successfully in version 2021.2.0.

I tested it on
image

Actually, here’s the project. Could you see if it will work for you?
Swara_Soni.zip (2.9 KB)