Dropdown in dynamic table

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
aextractor
Active Member

Dropdown in dynamic table

Jump to solution

Hi,

i am trying to set values in a dropdown field in a dynamic table depending on conditions using Script task. For string fields i usually use the folllowing line in my code:

tab_2.push({ident:tab_1[i].ident,value:'Yes'})

In here 'ident' (string) is the first column and 'value' (string) is the second in my dynamic table named 'tab_2'. In this case the code is running and the table is fulfilled. The problem is when trying to change 'value' as dropdown with options (Yes, No), that way the value field remain empty.

Is any body has an idea about how to set values to a dropdown field in a dynamic table using javascript ?

Thank you in advance for your support.

1 Solution

Accepted Solutions
bhchemss
Established Member

Re: Dropdown in dynamic table

Jump to solution

Hi Haboubi,

You only need to reference your dropdown id property to an object that contains a property name that will hold your value which is the option predefined in the columns of your table like this :

tab_2.push(
{
"dropdown_id":{"name":"option_1"}, //if you want to choose option 1 of the dropdown
...
}
)

Hope this help

Cheers

Chemss

4 Replies
afaust
Master

Re: Dropdown in dynamic table

Jump to solution

Are you talking about the dynamic feature of the Alfresco Process Services product? If so, this post should probably belong in the Process Services space. Let me know and I will move it...

aextractor
Active Member

Re: Dropdown in dynamic table

Jump to solution

Yes you are right, thank you to move it to the BPM service

bhchemss
Established Member

Re: Dropdown in dynamic table

Jump to solution

Hi Haboubi,

You only need to reference your dropdown id property to an object that contains a property name that will hold your value which is the option predefined in the columns of your table like this :

tab_2.push(
{
"dropdown_id":{"name":"option_1"}, //if you want to choose option 1 of the dropdown
...
}
)

Hope this help

Cheers

Chemss

aextractor
Active Member

Re: Dropdown in dynamic table

Jump to solution

Thank you Chemsseddine it is perfectly running in my code !

Really appreciated Smiley Happy