How can pass a selector scope for use app/browser through a Invoke workflow?

Hello,

Imagine the next: The process start, you start doing things in “Use App/browser scope” and you need to call an Invoke workflow several times, but the scope/main selector/whatever change from the first things you do, and after, the workflow returns to the main sequence with another scope.

MAIN Sequence “App scope”-> [Invoke workflow] → MAIN Sequence “App scope”-> [Invoke workflow] → MAIN Sequence "App scope → etc

How can I get the current scope/main selector/whatever and pass it through arguments to another “Use App/browser scope” inside the workflow? And also update later the new one, when the invoke workflows returns to the main sequence.

Because I am tempted to use the classic activities instead the modern ones, because them do not need to be within an “Use App/browser scope” that change forward the process

You have to have a Use App/Browser inside the invoked workflow. You can either use selectors for it, or use the Output Element from a previous Use App/Browser variable and pass that variable into the invoked workflow via parameter. Then put the parameter into the Input Element property of the Use App/Browser in the invoked workflow.

1 Like

Thanks for the response, I tried that, but UiPath Studio says “Use App/browser can not start with an input element” or similar :man_shrugging:

Not sure why you’re getting that error, I do this all the time. It’s a standard feature.

The problem might be that the Output Element isn’t populated until after the Use App/Browser completes. If your Invoke Workflow is inside the Use App/Browser then there’s no value for the parameter. Put the Invoke Workflow after the Use App/Browser and then try passing the parameter.

1 Like

Thank you!

Is a think I do not like, but It will be useful, or just go to use classic activities again, I do not like the need of define an scope every single time.

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