Using variables in Descriptors using CodedWorkflows

Good morning!

I’m trying to create a coded workflow and have the “ColumnTable” variable assigned in the descriptor of a text field of a table. This variable will be dynamic depending on the data I want to extract.

I have created the variable in these ways:

var ColumnTable= “9”;
string ColumnTable= “9”;

and even publishes:
public string ColumnTable= “9”;

And I always get the same error: No open windows found for ‘ColumnTable’. Please check if the application is running.

I use the descriptor in the workflow as follows:

TargetApplication.Click(Descriptors.Ebroker.Main2.INFORMACION); (If I use it without setting the ColumnTable variable, it works perfectly.)

What should I do?

Thanks in advance!

This is the content of the CodedWorkflow file I am using.

You’ll need to provide the variable via a ClickOptions object. You can try with the following:

        public void Execute()
            var ColumnTable = "9";
            var AppBrowser = uiAutomation.Open(Descriptors.Ebroker.Main2);
            var clickOptions = new ClickOptions();
            clickOptions.Variables = new Dictionary<string,string>(){
                {"ColumnTable", ColumnTable}
            AppBrowser.Click(Descriptors.Ebroker.Main2.INFORMACION, clickOptions);

@efelantti It works perfect!

I was drowning in a glass of water xD
Thank you so much!

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