Assign Activity Changes case of Boolean Value when variable is undefined

This annoyance may be a feature or bug, I am not sure.
If you use an undefined variable name in an Assign activity, the value changes on its own.

This causes a bit of confusion once the variable name is defined, because now the value may have unexpectedly changed.

To illustrate for a c# windows project:

  1. Create assign activity using an existing boolean variable: (i.e. variable: checkpoint, value: true)
  2. Change toe variable name to a different undefined variable name and press enter.
    You will see the true value change to True (upper case T).
  3. When you put back the existing variable, the code is flagged as an error (the name True does not exist in the current context). This can be fixed by changing True to lower case true.
    uipath-assign-arbitrary-value-change

I believe the value field should remain unchanged.

Hey @grosner

In Vb.Net by default it is True following title case.

You can just verify it by pressing Ctrl+Space

Thanks
#nK

Hello @grosner

Are you trying to create boolean variable in the assign activity? So it can either have 2 values"True" or “False”. I hope that why if you create a new boolean variable its setting the default values as “True”

I am using a c# project and the difference is only true or false (case sensitive) will work.

Yep right @grosner !

Thanks for reporting. It looks like a bug to me, I pushed it to our issues tracker.

Apparently, this has not yet been addressed as of version 22.4.4. Any idea when this will be fixed?

An internal comment left on the issue that is linked to this topic says that 2022.12 no longer reproduces this issue, so soon I guess :slight_smile: