Dropdown options expression


#1

Good day,

I was playing around with the new options expression feature in the form builder, and came around a weird behavior that I think it’s a bug.

I created a process with an http task that load the following JSON from a server into a variable called options

[{“id”:“11”,“name”:“Option 1”},{“id”:“22”,“name”:“Option 2”},{“id”:“33”,“name”:“Option 3”}]

then in the options expression field I wrote ${options}

in the task app when I reach that form the options in the dropdown are shown but with values of 0,1,2 instead of 11,22,33.

is this an intended behavior or a bug?

Regards,


#2

Sorry my bad,
in the next task the correct value is assigned (selected “option 2” and the value was “22” not 1), but the only problem now is that if you have set the field as required you cannot select the first option because it has a value of 0 in the form.


#3

Any news to this one? I have the same issue.


#4

Hi Guys,

Not sure if this is related. I see in the trail that it is expected that subsequent use of a dropdown with the same variable name as previously used, should show the value that was selected previously. It looks like this may be buggy. I am using an expression to set dropdown values on form A in TaskA. I then use the same form (form A) on a subsequent task (TaskB) and the value is not set on the dropdown as expected. It shows as empty with the user having to select a value again. I have checked and the form value in the variable has been set correctly in the first task.

Am I wrong in assuming that the value for the field should be displayed in the dropdown if previously set for the process?

Regards

Brian