Select query help


For me i am not getting any error the code is working fine. i think the error is due to UiPath.System.Activities package is older version i guess. if you have older version could you pls upgrade to latest. Please note that before doing all this pls take back up of your project and do all these changes.

After upgrade to latest try execute that invoke code activity. thanks

1 Like


I think there needs to be some imports done


I have only one extra package other than default packages. that is below


@prasath_S : i am able to run your code in my studio. But @Shilpa_Mohanty is not able to execute the invoke code you have provided. could you help on this.

1 Like

@Shilpa_Mohanty @kirankumar.mahanthi1 this is the first time ,i am seeing this error.
tagging @loginerror @Yoichi @ppr @StefanSchnell for help.


@loginerror @Yoichi @ppr @StefanSchnell

Can anyone please help

@Shilpa_Mohanty @prasath_S

Hello Shilpa and Prasath,

I just tried the code sequence and it works fine for me, for Windows - Legacy and Windows mode, with UiPath Studio 2021.10.2.

The class Microsoft.CodeAnalysis.SyntaxTree with the method ParseText is part of the Roslyn compiler. It is part of the Studio installation and in a normal case I would never expect this kind of error.

Here as example my two test cases, please try it and let us know your results. (99.9 KB) (56.6 KB)
Extract this files in your C:\Users[YourUserName]\Documents\UiPath folder and open the project file from the front page of the UiPath Studio. Does the exclamation mark appear in the upper right corner of the Invoke Code activity?

Best regards


@Shilpa_Mohanty @prasath_S @StefanSchnell


I can just reproduce this problem in my environment as the following.

I haven’t get the exact conditions for reproduction yet, but In Studio 20.10.9 with System.Activities package 21.10.2 this occurs. If downgrade System.Activities package to 20.10.4 (this is bundled version of Studio 20.10.9) , there is no error.

So for now can you try to downgrade System.Activities package to 20.10.4, if you use Studio except the latest.



We can’t downgrade as we have been asked to use the latest version


Which version of Studio do you use, 21.10 , 20.10?



Hello Yoichi,
thank you very much for sharing. Very interesting aspect. It could be be possible that the “older” Studio release doesn’t contain the Roslyn compiler, that would explain everything.
Best regards



Hi Shilpa_Mohanty,

Have you solved your case or not yet?

In case you haven’t I will suggest to use the expression mentioned is my post referred in here:

Create an invoke code with one argument in/out named InitialDT and as value give your table containing the values (83 columns)

InitialDT.AsEnumerable.Where(Function (c) c(“<Name of the column>”).Equals(“”)).Select(Function(c)
c(“<Name of the column>”)=“0”
Return c
End Function).ToList()

Replace the “<Name of the column>” with your column name (the one you would like to replace the values)

Replace - Equals(“”) with Equals(“-241”)

if the column is of other type than string you can add the .ToString like this:

InitialDT.AsEnumerable.Where(Function (c) c(“<Name of the column>”).ToString.Equals(“”)).Select(Function(c)
c(“<Name of the column>”)=“0”
Return c
End Function).ToList()

Copy the invoke 3 times and change the mane of the column.

Let me know if worked.


We cant use Invoke Code activity and hence we prefer taking an assign activity and writing a linq

In this case the only solution for you is to use a combination of Linq expresions.

First - Do you have a unique ID in your table that can be used for merge?

If the first is yes you can split the table in two.
One part to contain the columns you would like to replace the values in and the UniqueID
Second one with the rest of the columns and the UniqueID.

Use the Linq expression in my post to replace the values
Use a second Linq expression to merge back the columns.

You can do the split and merge with standard UiPath activities also so is your decision.

P.S. If you don’t have an UniqueID you can generate it.

Hope this helps.

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