Datajoin elements save null when runder as checkbox

confis

Member
Hi,
Datajoin elements save null when runder as checkbox for multiple select

Any way to save multiple select on datajoin?

Like in checkbox element
 
Are you talking about what actually gets saved in the main table?

Checkbox and multiselect joins automatically create a many-to-many mapping tables, named <parent-table>_repeat_<joined-table> ... so for instance I have a checkbox join to us_states on my fab_cdd_test table, so it creates a fab_cdd_test_repeat_us_states table, which has a standard many-to-many map - a parent_id FK pointing back to the parent row, and a us_states FK pointing to the joined us_states row. And for each checkbox selection, a row is created in that map.

But yes, the main table's field (in my case 'us_states') will be null.

That's just a database thing. For a dropdown join, with only a single selection, we can do a simple one-to-one FK join, where the field on the parent table has the FK value pointing to the joined table. But for multiple selections, a many-to-many map table is required. WIthout a map table, you can't have multiple values for a join.

Checkbox elements don't have to join to other tables, so for those we just store the multiple selections as a JSON array.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top