Error: 'left’ is a type and cannot be used as an expression

Hello All,

Can you please help with below error. Below expression is used in Array Row in Add data row activity.?

I want to get left 8 char of value in element cell in datatable. Mid is working fine for me.

Error ERROR Validation Error Compiler error(s) encountered processing expression “{row(“Co”).ToString,row(“element”).ToString,CInt(“0” & row(“Amt”).ToString),left(row(“element”).ToString,8),Mid(row(“element”).ToString,10,4),”","",""}".
‘left’ is a type and cannot be used as an expression

give a try on following:

ensure following:

Kindly note the s On Strings and do not missmatch with String without s on end

Thanks for responding.
Yes, I have Microsoft.VisualBasic space imported. for now, I have it working using String.Substring(0,8).

but really want to understand the error and how to resolve. Could not fine any explanation on this error.

it is a strange issue / confusion

Your statementwas accepted on my end:

we had some times such scenario that a valid ststement is not accepted. Then we do following cascade:

  • delete Assign / Activity that was used and reacreate it
  • reopen Xaml, run first step (stepwise debug) the XAMl without the problem activity (e.g. out commented)
  • close Studio, delete all caches from uiPath Project, reopen
  • clean all (problem activity, close studio, clean UiPath Project cache) restart machine

last cascade step occurs very, very rarely

Okay, Thanks for trying and letting me know. :slight_smile:

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