Goal: I am trying to implement a bulk insert operation. The insert operation itself works; however, the filter logic intended to check if the data already exists in the database does not function as expected. I need the bulk insert to exclude records that match certain conditions against existing database entries.
Steps: I tried different filter syntax as well as using a normal insert a sql code with insert.
The switch filter works perfectly. As you can see in the screenshot on or both of the switches has to be enabled to be saved into the postgresql db. Some of the columns are arrays which may be the root of the problem but im not sure
Is there any part of the data that is unique like a UUID? If so, you could probably add a check for that in a function before running the bulk. update....
Hey Scott,
unfortunatly that isnt possible since its an insert and the data that gets inserted cant have a unique id since there are multiple combinations that have to work.
e.g. parcel 1 from person x is in project y but parcel 1 from person x can also be in project z. and project y can also have parcel 2 from person x or parcel 1 from person a.
Hey Scott,
I actually found a workaround with a unique string column.
The problem with the filter still stands. I even tried diffrent "only run when" codes for the event handler which didnt work as well.
e.g.
table1.data.includes(entry => entry.id_vertrag !==
String(vorhandene_eintraege.data.id_vertrag)
Do you know what the problem with the code could be? The data from vorhandene_eintraege.data is in form of an array since its a select query of the insert table. The table1.selectedRow.id_vertrag data is a string. Could this be the problem?