Hi,
I am trying to use a dropdown field in Uipath Form Task. But in Action Center, the dropdown field is always auto-populated with the last value of dropdown list. I am taking the dropdown values from a datatable.
@amrutha.saseendran
I believe your value in the column in datatable (associated with the data grid) has a default value set when the task was created.
If you set that to blank, the dropdown will render blank.
Hi,
Thank you for your response!
But there is no default value given for the dropdown field.
Here in the below screenshot ‘Select one from list’ is not default value. I given it as the last value of my dropdown list. Dropdown is auto-populating whatever the last value in the list.
In my case there is multiple rows with different dropdown values for each row. That is why I am using datatable column for passing values to dropdown list.
A few things I noticed which should be corrected in the workflow:
The datatable being passed to the ‘CreateFormTask’ has a suffix _dropdown. This is a special keyword for form actions and should only be used for passing list of dropdown options and nothing else.
The Dropdown component has the field key ListMultiple_dropdown. The field key should have been ListMultiple. And the ListMultiple_dropdown list of dropdown options should be passed in the form collection instead.
You are adding a column named as ListMultiple_dropdown in datatable. When you do correct with (2), you should rename this too correctly.
I removed the suffix _dropdown from both datatable and Form Task.
But as I already mentioned, in my case there is multiple rows with different dropdown values for each row. If there is large no. of rows, it will be difficult to pass the dropdown values as list in Form Task( as each row will contain a dropdown with different values accordingly).
That is why I tried passing value from datatable.
Then I am getting the dropdown field value as auto-populated with whatever the last value in the list.
@amrutha.saseendran
If I may ask what’s the use case for having different options for dropdowns in the same column?
And if you can explain how you are developing the form, it will help me understand and recommend a solution to it.
It might be the forms and dynamic dropdown might not fit your usecase.
Hi,
As per my usecase scenario dynamic dropdown is re-iterating for every row.
Example:
My requirement is to remove the auto-population of the dropdown field. Or is there any way to make the dropdown field as mandatory? As there is already some value is populating required field condition is not working.
@amrutha.saseendran are you able to resolve this? Also, how did you get the dropdown list values change using data table? I am trying to do the same thing as I have many potential rows/key and it is not possible to build a dictionary for all rows/key. Right now the _dropdown values won’t change when row/key change. I used trigger/custom action but it does not work.