While passing row value as in/out argument to invoke workflow, i got error like 'Invalid L-value expression'. Please help to resolve this error

While passing row value as string from data table as in/out argument to invoke workflow, i got error like ‘Invalid L-value expression’. Please help to resolve this error

Hi @Mahashankaripazhani

You variable is most likely not correctly initialized. Please see the solutions in this topic for a clue:
https://forum.uipath.com/search?q=Invalid%20L-value%20expression%20status%3Asolved

But if I save the same value in assign variable(string). Pass it to invoke workflow as in/out argument then it will work.
image

.

If i pass Rate per hour instead of ListitemDT.Rows(0)(“Rate per hour”).Tostring. It’s working fine.

In my experience the “Invalid L-value” errors crop up when I use Ctrl+K to create a variable, and then I switch the variable type from the GenericValue to something like String. I have to completely erase the information in the Assign activities as well as any Invoked Workflow Argument’s panes and then re-enter it for it to work.

I can only guess but I feel like the cause of it is that so long as the Assign/Invoked Workflow Argument is not erased, it doesn’t change dynamically change the variable type when you change it within the workflow’s Variables pane, so it requires you to completely refresh the Activity so it (I assume, but a wild guess) garbage collects the variable/pointer to the old type so you can reinitialize what it’s pointing to.

i/o - input/output argument means that you can pass the value into a workflow and get it back by reference. l-value error means that you are trying to write the result by not reference (or not by address, in other words).
Resolution: you should use variables instead of expressions or literals, passing i/o arguments, or just change type of argument to in if you don’t need the result of processing this argument…

3 Likes