Hi,
I am trying to get this to work properly, but I cannot seem to get it working. I am using attended automation framework to build an attended automation, and a new requirement is that I have to populate a drop-down with values that is dynamic in the input form. Let me explain:
I read an excel-file and thus I get a table named “dt_Svarsmottagare”, that contains the options for the drop down. This table contains two columns; one is the label that the user will see in the drop down list, and one is the value that will be passed from the selected item.
I created a drop-down select in the form “Form_Inputs-uiform” that is standard in the attended framework. I gave that drop-down the Field Key “svarsmottagare”.
I created a variable named dropdownOptions, that is a List variable, this will be the variable that I later use to assing to the Config variable.
For each row in the earlier read datatable “dt_Svarsmottagare”, I add a new row in “dropdownOptions” The rows that I add look like this:
New Dictionary(Of String, String) From {
{“label”, row(“key”).ToString},
{“value”, row(“value”).ToString}
}
In the end, I will have a list that contains all the rows from the datatable as a dictionary. Key value (label), and value (value).
I now assign the variable “dropdownOptions” to the Config variable Config(“svarsmottagare”), so far so good.
Now, since the attended framework automatically connects the options in my list if the same key exists within the Config(“svarsmottagare”), and the field key “svarsmottagare”, it does populate the drop-down with my options. And also correctly outputs the value that I can use later. The problem is that each option is displayed twice in the drop down list. The “Unique Options” in the display tab is checked.
I double and triple checked the input “dropdownOptions”, and it does not contain duplicates. When changing to Widget type “HTML 5” instead of “Choices JS”, I get only one unique options. However, that type cannot be empty, and thus the first option is selected by default. I do not want that.
Can anyone please advise me on how to solve the problem?