Bulk Update - My SQL table with Alias/Formated Columns

Bulk updates on MY SQL tables is pretty simple when the data is presented "as is". but the column names are not often pretty...

I have set the column titles using Alias's and I have formatted some of the data. Now my Bulk update does not work as it tries to update based on the Alias rather than the column title. I can get around this by removing the Alias and using Retool to rename the columns

BUT I have formatted a column to present data to the user in a specific way...

CONCAT("C",table.id)

This column would not be editable, but the bulk update still includes it so of course it errors as it doesn't actually exist in the DB.

Is there a way around this? is there a way to get the bulk update to ignor specific columns?

I have looked in the documentation and google for hours and I can not see a clear way.

Thanks in Advance

1 Like

Hi @Aran! Welcome to the community! :sunglasses:

Which key are you using to access the data in the table object & what's the flow from edit to update? I don't think {{table.recordUpdates}} includes column aliases or mapped values, but does include the custom column values. You should be able to change the column names, or exclude rows you do not intend to use by using the array.map() in the bulk insert. Here is an example or removing a custom column on update:

If I have record updates value of:

Then I can exclude the custom column by using array.map() + _.omit() :

Hopefully this helps!

1 Like

Hi @ben Thanks so much for your help, took a bit of fiddling but I have this working now. Thanks for your help