The first workflow is a simple message box that show the value of the IN argument boolean.
This first workflow is called upon by my second workflow. If I edit Argument and provide either True or False to the IN boolean, the message box show either True or False when running.
However, if I set a default value on the boolean in my first workflow and doesn’t specify any value when I call upon it, it has no effect. The value always comes back as False when called upon by my second workflow.
I have no problem using default values with string arguments. What’s going on here?
Why aren’t default values for booleans arguments respected?
@isakd Could you please share your sample workflow to check. Ideally should not be a problem using default values(with any data types) in arguments, provided the values in arguments are passed correctly from first workflow to second one.
It is working as expected because the default value for a bool variable is false, which means if you don’t explicitly specify the variable value it remains as false. Also, it does not depend on whether or not you calling another workflow or not. Even in the same workflow, if you don’t specify the boolean variable value and try to print it, it will come as false.
I have the same issue. When returning a boolean value from “Invoke workflow file” i only get “False” even when the value in the “Invoke workflow file” is “True”.
According to Prakshi_Tyagi it’s not solvable, you just have to work around it.
An UiPath developer I know IRL tells me this sounds more like a bug than a feature, but as long as you are aware of how it works you can probably work around it.