Arguments are not working in my invoked workflow

I am currently working on the UIPath Academy lesson “Project Organization in Studio”, and I am working on the second exercise. At one point, the activity asks you to extract an existing workflow, and rename the arguments that are automatically set up. However, when I extracted the workflow you see in the image above, I noticed that my arguments were not automatically created. Furthermore, when I created them myself, the program began throwing this error:

AttachBrowserGenerateaPage.xaml: Compiler error(s) encountered processing expression "out_Name".Invalid L-value expression.:Reference expressions cannot end with Conversion. The provided expression's type must exactly match the type T of VisualBasicReference<T> or LambdaReference<T>.

This error was thrown when I tried to assign a value to the arguments from the Get Text activities shown in the picture (as well as a third Get Text not pictured here), in spite of the fact that all of my arguments are GenericValue. What should I do now?

Use proper datatypes instead of Generic Value.

Generic Value is a made up UiPath thing and causes more problems than it solves.

1 Like

My apologies, I forgot to mention that changing these to String did not work either.

Delete out_Name. Clear out the Output/Value property of the Get Text. With your cursor in the (now empty) Value box, press CTRL+K and enter out_Name as the name of the variable to create. Go to your variables tab, right-click out_Name and select “convert to argument”

Then make sure in your Invoke Workflow that the variable you’re assigning out_Name to is also the same datatype.

1 Like

For some reason, that worked! Thank you for the tip. One more thing: do you happen to know why extracting my workflow did not automatically create the arguments? Can I change that in any way?

Click the Import Arguments button on the Invoke Workflow activity. That will automatically parse the XAML file and create the arguments for you. But you still have to enter the local variables (in the Value column). You can also use CTRL+K for this.

1 Like

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