Extra fields cascading drop-down list: possible?

Hello. I have been adding extra fields and what I need is a dropdown box that changes its list values depending on a “parent” dropdown box’s selected value.

I have these two tables:
Table name: factype (the parent)
Fields: rowid, strfactype

Table name: dept
Fields: rowid, strdept, fkfactype

I made two dropdown boxes for both tables: (1) cbo_factype and (2) cbo_dept. What I need is for cbo_factype to dynamically filter the list of cbo_dept according to the current selected value. The filter should be like this: dept.fkfactype= factype.rowid

In the instructions under the ExtraFields tab, it mentions this format:

“In order to have the list depending on another : c_typent:libelle:id:parent_list_code|parent_column:filter”

So what I did was this:

dept:strdept:rowid:cbo_factype|rowid: WHERE dept.fkfactype= factype.rowid

This doesn’t work. I’ve tried many variations but I can’t produce the cascading effect that I need. I hope someone could help out.

Does anybody have a solution?

Hi! did you resolve this issue? Please post your solution, thanks! :sunglasses:

Hello, Someone have solved it?

I have also the same problem. Looking for the answers.

Finally, I can solve it.

kindly share how you did it?

Hello,
I found a way to do it: Go to the extrafields page of the module that you’re working. Click to edit the column you want and at type, select “Select list” or something like this.
Then, put your options at the value field following this rule:
value1, name1
value2,name2

Click on Save and there you have it working.

How you solve it? I need same things.

Finally, I solve it by some tricks

cust_custab_site_extrafields:sitename:rowid::fk_object=($SEL$ fk_project FROM llx_ticketsup WHERE rowid=$ID$)

dept:strdept:rowid::fkfactype=($SEL$ rowid FROM factype WHERE rowid=$ID$)

1 Like

is this native code or module code? It looks very confusing

Now my code is “cust_sitelist_extrafields:sitename:rowid::fk_object=($SEL$ fk_project FROM llx_ticketsup WHERE rowid=$ID$)”
cust_sitelist_extrafields= It is the table name which is actually from custom tab of Patas Monkey
sitename = Its the field of cust_sitelist_extrafields where name value is store
rowid = this row id for cust_sitelist_extrafields
1st part from which it will quary cust_sitelist_extrafields:sitename:rowid

Now comes to Filter (fk_object=($SEL$ fk_project FROM llx_ticketsup WHERE rowid=$ID$))
I make many lists under the project by Patas Custom Tab. So When I create ticket 1st I select a project and based on project rowid, this filter will be done.