Problem with Create Form returning all values in drop-down list

Currently, the Create Form displays a drop-down list as shown in the image below, and after clicking the send button, the value of the selected item is displayed in a message box.

dialog

However, when I select the default value, “Jack,” and click the send button, all the values in the drop-down list are returned, as shown in the image below.

defaultValue

Also, if I select another value other than Jack instead of the default value, it returns the selected item as shown in the image below.

NotDefault

I’m currently looking for a mistake in the default value setting, but I can’t find it. Please let me know if you have any ideas on what could be causing this.

Thank you very much.

Hi,
I tried recreate you case and everything works fine. It is my setup and I hope it will be helpful:
image
image
image
image



image

/edit:
so in your case you should use your desrialized json value and (“DropList”)

Here it is my project. You can take a look :slight_smile:
dropDownList.7z (40.5 KB)

Thank you for reasponding

It’s been very helpful, but let me add a few things
The customer wants me to import from an external Excel file like the one in the image, and he wants me to do it without pre-describing it in Create Form.

Therefore, I am currently using a Dictionary <String,String> to import the values of the image, and a String variable to store “Jack, Mark, Nancy, Tom, James”.

I’m trying to figure out how to put these variables into the Create Form and output them as a drop-down list. So, here are two things I don’t understand.
1,How to put the value into the Create Form
2. How to apply the value to a drop-down list

【What I did
1,I first tried to do it using the input dialog, but the customer asked me to change the button on the input dialog to “Done” instead of “OK”, so I used Create Form instead.
2、I applied the values of each selection to the data as Piotr Kołakowski did, and when the customer saw the data, he asked me to set it up so that the selection values could be changed by reading from Excel, so I changed it to an external import type.
3、Now, when I select “Jack” as in the first question, all the values are returned, and I am currently looking for a countermeasure.

I am sorry to say that this is a lot of work.
If you know how to fit a drop-down list from String values like the one in the image, please let me know.

Thank you very much.

Hey,
let me know if it is what you looking for :slight_smile:
dropDownList-dynamic.7z (40.6 KB)

Thank you very much for providing us with your valuable samples.

I just checked it, but when I select “James”, it is returned with the following value.

2021-11-13 (2)

So, I guess it goes back to the first this question, but I am in a situation where all values are returned when I select a specific value, especially the value in the last part of the List, as shown above.

I am currently looking for a way to work around this.
If you know of a workaround, please let me know.

Thank you in advance.

Hey,
I changed a little bit in script and now it’s working fine :slight_smile:
Please take a look and let me know:
dropList.7z (40.6 KB)
I really hope that it’ll help you :slight_smile:

1 Like

Hey @pikorpa , since we are in the context of UiPath forms, I have one small doubt regarding something. I am looking to add color into the text fields inside UiPath forms based on conditions.
For eg:
I have 3 text fields in the forms

  1. Color 1
  2. Color 2
  3. Color 3

If Color 1 value is RED I am looking to make the text box colored in RED (filled color), similarly for other fields and other colors. How can I achieve this? If this requires javascript or html, can you please share the snippet as I cannot find any doc explaining this.

Thank you very much.
I just ran the check and confirmed that the value was returned successfully. I would like to use Solution with this, but I’m afraid I have to ask you to tell me what you changed.

I am embarrassed to say that I checked the myList_dropdown variable here, but when I look at the FieldKey part, it is myList, and I cannot find myList_dropdown, so I cannot find how to apply the data.

I apologize for the inconvenience, but please let me know how you are applying the data.

Thank you very much for your help.

I found out that I should have set the argument of Create Form to ListVariableName_dropdown.

Thank you very much.

1 Like

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