Variable ErrorL invalid lvalue expression reference expressions cannot end with conversion

Hi pduffy,

Try to open the variables menu at the bottom of the main window (you have the options “Variables”, “Arguments”, “Import”) and create the variable there. This variable should be okay to assign in the “Results” field.

Another option: after you create the variable using the “Result” field, assign the output value to something else (it doesn’t need to exist) and then assign it back to the original variable you created. That should also avoid this error.

Cheers,
Dirk

1 Like

Thanks Dirk. I had already tried all that though. In the end, for some reason, opening an old project that used to work and then re-opening the test case solved the problem. I’m having other problems with data typing now but probably down to pilot error.

Thanks again.

So I am having this issue again, when trying to use the “Matches” activity:
https://www.uipath.com/activities-guide/matches

For the output, I create:
System.Collections.ObjectModel.Collection<System.Text.RegularExressions.Match>

When I assign this as “Result”, I get the familiar error message:
Invalid L-value expression.:Reference expressions cannot end with Conversion. The provided expression's type must exactly match the type T of VisualBasicReference<T> or LambdaReference<T>.

Am I doing something wrong or how do I prevent this issue?

What is the timeline to fix this bug?

Hi,
I’, trying to use “isLeap” function. current_year is the variable and it contains the value.


But I’m getting this error. can anyone explain me to use this function.

Hey @Senthilkumar55

You have to use like this: Boolean IsleapYear = DateTime.IsLeapYear(Now.Year) //it will return Boolean output.

REgards…!!
Aksh

Thanks, it works!

Hi,
I am new to uipath and I was trying leap year example . When i create a variable of type int32 for input dailogue it shows below error.
“Invalid L-value expression.:Reference expressions cannot end with Conversion. The provided expression’s type must exactly match the type T of VisualBasicReference= or LambdaReference.”. Variable was created using keyboard shortcut Ctrl+k. Tried creating other variable year2 still got the same error. Later tried creating variable manually without using shortcut and this time error resolved. not sure if there is any issue when we create variable with shortcut.

Regards
Uday

Came here because of the same problem. What’s with this? How can it be that, one year after your response, this is still an issue that is not mentioned in the course?

For me, simply adding a nonsensical ‘function’ to the variable and then deleting it again worked.

@aksh1yadav @Gabriel_Tatu
Is the error occurring because of the following reason :

  1. Ctrl+K creates a variable of generic type - Which means will it store all the values entered by the user in inputdialog converts to string.(Not sure whether this statement is right or wrong)[Correct me incase i am wrong]
  2. And since we are trying to convert string to integer, are we getting this validation error.

Thanks!)

Got the same error . And yes your solution worked . Not getting errors now

1 Like

Same error here. It was infuriating. I had to delete the variable and start again. It must have taken me an hour to get to the bottom of the problem. I nearly gave up on UIPath as a result of this glitch.

Hello, I’m using the newest 2018.3 beta, and the issue is still present. Will this bug ever be fixed ?
I do not understand why I have to use the variables window and then use the autocomplete function in the input dialog for this to work. It makes no sense.

I just started using UiPath and i got an error in the first place. The same Invalid L value expression. What do i do? Even the file location is accurate . Still it shows the exclamation.!

You are setting your value in the output Text property.
You can not assign values to output property. you can get a value assigned to a variable by specifying variable name in the output property. Instead of the text in quotes, specify your variable name.

UI posted here in June 2017 that it is a known issue. Just wanted to report that issue still exists.

I resolved it by creating a new variable with a different name. Prior to that I made a mistake when I created the variable the first time so that must have messed something up with that original variable.

1 Like