New UiForms Don't Allow Dynamic Dropdowns

So in Studio we now can make a new type of object, UiForms.

These are basically the next iteration of the previous way of building forms, still based on Form-js but with a much better editor and events etc.

My problem is I cannot find any way to enter a dynamic value in the dropdown control.
Previously you could do this by manually adding an argument named after the dropdown you want to add options for, suffixed with a “_dropdown” and pass a List

I cannot get this method to work with uiforms.
The documentation portal contains no info on how to do this, only in the legacy way.

Is there some hidden feature I haven’t seen? Otherwise this seems like a missing feature and a pretty important one no?

@Jon_Smith

Did you try this

Without _dropdown use the same name as field key

cheers

Interesting. I did not because how would I then get the value I select in the dropdown back out?
If its an In/Out argument would the ienumerable returned only have one value?

Edit:
Indeed a test shows that it only allows an Input, an In/Out argument breaks the behaviour and only selects the last value in the List and doesn’t pass out the selected value, just the same list.

You also cannot make two keys, one with a List input and the other with a string output as the keys must be unique.

I need to pass a list in dynamically but also be able to read the value selected, otherwise it is abit pointless to have that field.

Do the new forms have the JSON output of all the form data? I think that’s how you’d get the selected value.

No, they are definitely an improved experience (excusing this missing feature) and did away with dealing with the JSON. Instead you just get a form that pops up and shows all the available fields based on the controls in the form.

Anil’s screenshot shows one of the dialogs where he is passing Listval to a form as an input argument.

As mentioned this works and can populate a list, but the output needs to be a string and you cannot have two keys with the same name so you are screwed.

@Jon_Smith

So after a little trail and error …we can get the value…using get form values activity…so basically use show forms as above and then use get form values activity with same variable name but now select it a string and assign a variable to it…you can see the value that you selected


Show form activity

Get forms values

image

looks like it is now seggregated into two instead of combining into one

Hope this helps

cheers

That does help @Anil_G as if it works then it means at least the same behaviour as before can be restored.

It does feel like a workaround or inconsistency considering you can get values out by using the direction ‘Out’ in Show Form.

I could make decompile their code and see if there is indeed a hidden way to do it, I’d like to hear UiPath views on this so kindly I will leave off marking yours as the solution for now, if I cannot get any engagement from them I will mark yours as it.

1 Like