UiPath Out Argument Returns Nothing Due to Same-Named Variable in Inner Scope
A UiPath developer reports that an Out argument assigned inside a Do or Sequence block can come back empty with no error, even though a message box confirms it was filled. The cause is usually a variable sharing the argument's name, created in an inner scope, which takes precedence at runtime over the argument. The author notes that the Ctrl + K shortcut in an Assign's To field creates a new scoped variable rather than an argument, making duplicates easy to introduce. The suggested fix is to delete the duplicate variable, keep the argument, and re-select it in the Assign activity. Workflow Analyzer rules ST-NMG-005 and ST-NMG-006 can flag these conflicts, and the author recommends direction prefixes and assigning the Out argument once at the end of the workflow.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in