I have a default value of true set for a boolean column, I am using the Table Update node and it’s Add row if not found. I have the update set to change the value to false as the update, but new rows are being updated to false on the add. How do I get the add to be true and subsequent updates to be false using the update node and the ‘add if not found’ option?
You would have to perform that logic in your Workflow prior to create/update. It’s common to first use the Table: Get Rows Node to check for existence and then create or update with the desired fields.
Doesn’t that defeat the purpose of the ‘Add if not found’ option of the update? You would think the add would put the default values or null on the columns.
Well, the ‘Add if not found’ option will create the new entry with the values you were trying to update with, which was the desired thinking behind the node. It’s more of a “add the value I was trying to update if not found”.
Your behavior is different based on creating vs. updating; in this case, I recommend using their respective nodes.