Compiler Error in Studio

Hello Team,

I am a newbie, trying to learn Uipath Studio’s first process steps.

As per the tutorial instructions, I’ve entered the below command but getting an error.

row(“Name).ToString.Split(” "c)(0)

I saw an update on similar errors from someone else and tried their solution as follows;

CurrentRow(“Name”).ToString.Split.(" "c)(0)

But this is not working either.

Please can anyone assist me to troubleshoot this?

Thank you,
Anu

Hi,

You have to use currentRow in inside for each row loop. We cannot input outside of for each loop.

Use for each row loop and insert your data table so it will give your current row one by one inside you can use your type into. Please try and let us know.

Or if you already using for each row since we cannot see total screen. Please use the expression like below.

CurrentRow(“name”).tostring.split(" "c(0))

You should not use “.” After split function pls review

Hi @Anu_8844

Welcome to UiPath Forum.

You can use either the method mentioned by @kirankumar.mahanthi1 or the below one

Split(CurrentRow(“name”).ToString," "))

Hope this will be helpful. Thank you.

Hi Kiran

Thanks for your response.

I am using “for each row”.

And tried again as advised but it’s still showing the error.

Cheers
Anu

Hello Jobin

Thank you for the response.

I have tried as advised but still getting an error. Please help cross-check.

Cheers,
Anu

Hey,
I think you should use for each loop inside for each.
Please take a look this great tutorial made by @AndersJensen
He explained everything what you need to this task :slight_smile:

1 Like

Hi Anu,
I can see additional close “)” in ending kindly remove and if still facing the issue please provide the full error message

Else try below code

CurrentRow("name").ToString().Split(new char[0]).First()

Regards,
Arivu

1 Like

Thank you Piotr :smiley:

Thanks everyone, its working now

Hi @Anu_8844

The extra closing “)” was the issue. Typo mistake. Thank you @arivu96 for pointing out.