CDD to repeating group

Status
Not open for further replies.
Hello, I need to have a form with 2 dropdowns, where first will point to another form element in main table and second element to repeating group based on selection of first dropdown. I have already prepared 1st dropdown as databasejoin to main table but based on another thread, I cannot link cascadingdropdown to databasejoin in different table.

Example: I need to choose one invoice from my database in first dropdown and in second dropdown one item of this invoice (repeating group)

Thank you for your help
 
Is the problem that the table for the repeat group (like yourtable_XX_repeat) doesn't show up in the dropdown for the "List" in the CDD?

In CDD's (unlike join elements), the table you want to join to has to be a Fabrik list. So you'd need to create a new list, and select that repeat table for it. You wouldn't have to do anything else with that list, it just has to exist, so the CDD can "see" it.

-- hugh
 
Hugh, thank you for your reply. I think you understand correctly. In this form I have databeasejoin element linked to main table where ID si set to ID and label to NAME. Second element is CDD where list si set to this main table and here I can see repeating group elements only in Foreign key but in Id and Label are only elements from main table - not from repeating group :-(
 
Right. So if you need the CDD to point to the repeat ... go create a Fabrik list, and select the repeat table you want ... it'll be named like yourtable_X_repeat, where 'yourtable' is the main table name, X is the repeat group ID. Once you have that as a List, you'll be able to select it in the CDD.

-- hugh
 
Just to be clear ... when you create a repeating group, we create a separate table for storing that group's data, with it's own 'id' (PK) and a 'parent_id' (FK, foreign key) pointing to the main table's PK. We automatically names that table as described in my previous post.

But as that table isn't a "List", you can't select it in a CDD, unless you go and create a List for it.

-- hugh
 
I was little bit confused, because repeating group elements were loaded in Foreign key but now it is clear for me. I have created separate list for this table and now it works. THANK YOU!!!
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top