UiPath Create Form Task Activity, How to pass in values to drop-down list and retrieve it?

I have created a form via the “Create Form Task” activity from the UiPath.Persistence.Activities package. I was trying to create a dynamic drop-down list component via the form designer. The drop-down list values will be based off a list of strings that is passed in from the “Collection” property.

image

In the form designer, I created a drop-down list component and set the following. The variable io_itemList is a list of strings. This way, the drop down should show my list of strings as possible options to choose from.

This will create the form task on the action and displays the options; however, when I return via a “Wait for Form Task and Resume” activity, the following error occurs which essentially states that a string cannot be converted into a list of strings. (I have also tried this with an array rather than a list, and it causes the same issue)

I have tried exploring the following forum page:

Unfortunately, this does not solve my issue as there is a special output property in the “Create Form” activity to retrieve selected values from the form as a JSON string. The “Create Form Task” activity does not have this property.

Any suggestions on how I can get the selected value from the drop down list while displaying a dynamic list/array?

Hello @jchieng!

It seems that you have trouble getting an answer to your question in the first 24 hours.
Let us give you a few hints and helpful links.

First, make sure you browsed through our Forum FAQ Beginner’s Guide. It will teach you what should be included in your topic.

You can check out some of our resources directly, see below:

  1. Always search first. It is the best way to quickly find your answer. Check out the image icon for that.
    Clicking the options button will let you set more specific topic search filters, i.e. only the ones with a solution.

  2. Topic that contains most common solutions with example project files can be found here.

  3. Read our official documentation where you can find a lot of information and instructions about each of our products:

  4. Watch the videos on our official YouTube channel for more visual tutorials.

  5. Meet us and our users on our Community Slack and ask your question there.

Hopefully this will let you easily find the solution/information you need. Once you have it, we would be happy if you could share your findings here and mark it as a solution. This will help other users find it in the future.

Thank you for helping us build our UiPath Community!

Cheers from your friendly
Forum_Staff

@jchieng A dynamic dropdown component should have the field key of type string and not of type List. You should pass the list of string as options to <dropdownKey>_dropdown field.

For example, if your dropdown’s field key is io_item. Then:

  1. io_item should be of type string and will contain the selected value after the wait for form task activity.
  2. io_item_dropdown should be of type List<string> or a dictionary (please read the doc mentioned below). You should pass all the options you want to populate in the dropdown in this field.

Please have a look at the doc → https://docs.uipath.com/activities/docs/advanced-controls-form-designer#dynamic-drop-downs

HI @jchieng ,

Additionally, you can also refer below UiPath sample project on Action center usage with dynamic dropdowns.

Test Action Center.zip (4.2 KB)

Please change orchestrator folder path name(per your settings) in activity before use.

Hope this helps.

Regards
Sonali

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