AutoFill values from left join table

AutoFill values from left join table

icefieldicefield Posts: 45Questions: 19Answers: 1

Using autoFill to modify data in table works well. Just discovered that feature Friday, and can't tell you guys how impressed I am with the ease of implementing that feature on data tables.

But . . .

Some of the tables in my app use leftJoin's to pull in additional attributes from associated tables. In order to update information in the editor for the leftJoin tables, I return the record id of the row in the associated table. When editing these values in the editor, everything works fine.

Today I noticed that autoFill generated edits send the value to be updated in the leftJoin table to the editor, but the record id for that row in the associated table is not passed into the editor, and thus the leftJoin'ed data is not being updated as part of the autoFill operation.

How do I go about getting autoFill to include the leftJoin'ed table's record id so that information in that table is updated?

This question has an accepted answers - jump to answer

Answers

  • icefieldicefield Posts: 45Questions: 19Answers: 1

    Spent a bit more time researching this issue. Came across the submit option on this page: https://editor.datatables.net/reference/type/form-options.

    Added the following option to the editor:

    formOptions: {
                bubble: {
                    submit: 'all',
                }
            },
    

    and the full row information is sent to the editor during the autoFill edit.

    Can you confirm that this is the correct method I should use to get autoFill to work with leftJoin'ed table data?

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin
    Answer ✓

    That is correct yes.

    Allan

This discussion has been closed.