Argument not retaining value after boolean If statement

I don’t know what you call this, but it seems like the devil has entered my script. All of a sudden, my argument is not being passed after the boolean condition. The default value is 1, but then it becomes 0 right after entering the boolean value which is True. Don’t ask me how. This is causing an error further on in the workflow and is also stopping me from continuing my project. Took me some time to find out where the issue is arising from, and this doesn’t seem to be something I can fix from my end as I already tried everything.

@private_matter

Check if there is a second variable inside scope

cheers

This is not a variable. It’s an argument invoked from another workflow. So the value should be retained across the entire workflow.

Hi @private_matter
Agree with Anil, can you check if by any chance there is a variable under the same name. UiPath allows having argument/variables under the same name.
Review all the scoped

Hi @Eric_Alvarado ,

Arguments do not have any scopes to define only variables. and there cannot be the same argument name as UiPath does not allow this. If this was a variable, probably yes, the same name can be used multiple times and in different scopes. There’s not even any variable name called P2B_ST as I already checked just to make sure.

@private_matter,

Share the sample code to test.

@private_matter

Even if it is an argument…a variable can exist with same name…anyways if you say its not there then we can check other things

Is that a parallel function that you are using?..

Cheers

@Anil_G @Eric_Alvarado

Look you’re right. Inside the If scrope there was another scope and inside it, there were indeed the same variables as that of the argument names, and after deleting them, the issue was solved. My bad for not checking properly.

1 Like

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