Forms activities: pass option values

I need to pass option values to a Form so that the user can choose one of them (from a droplist). The values I get from a database and then store them in a dynamic variable (it doesn’t matter what type, i can adapt) so I can not put them directly into the form as ‘Values’, I need to treat them as if I don’t know what they are.

-I have tried passing an array with data binding but that didn’t work, the field just takes the whole array as the result.
-Also, I have tried with the ‘Custom’ option in Data with the following code:
‘for (var item in arrayministerio) {
values.push(item);
}’
but the Form can’t seem to access my array stored in Uipath.

So, how can i achieve this?

1 Like

Hi @m_p,

I tried to add array of string via values as data source and found that every time drop down list comes up with double values of whatever the array is :thinking:

S1

Output:

Hi, yes i noticed that too (it’s strange but it’s not the principal problem right now, but if you find a way to solve it, please tell me). I wnto to know: what output do you get when you choose one option? Is it what you chose or the entire array? (By output i mean the json string you put in properties)

This is what i get (see key “ministerio”)
output

Hi @m_p,

Entire array:
S2

:frowning: Ok, thanks anyway