Make Changes to Things Only If the Data is Different

Does anyone know if Make Changes to a Thing can be constructed to only make changes to columns in a thing if the data for that record and that column is different?

For example, if I have a campaign and it has start and end dates and a description. My edit Campaigns form allows the user to update them all, but the User might only update the description and leave the start and end dates as they were.

Is there a way to account for that in Make Changes to Thing? It seems like that would be an operationally efficient way to manage the database rather than overwriting all of the columns in the table for that record.

This is essentially a PATCH call in REST APIs, but I don’t think there is that type of functionality in Bubble.

As an alternative, you can set up a workflow with actions for each field you want to modify and a condition in each action Input value != Database value for the field :smiley:

It is a bit of a crazy workaround though, but it will work

1 Like

But I wonder if that actually creates MORE worklfow units and consumes more WU’s It is in fact the PATCH (was not sure anyone knew what that was) that is missing (or appears to be).

WU-wise - it will be highly dependent on the number of fields you are writing and updating, so hard to predict really. My assumption would be to just do Make changes to record and that’s it.

Also, on a different note, I’m not sure how much data you are gonna push through that process, but I find in my workflows those types of WU-centered optimisations don’t really impact the overall WU usage. The things that consume WU and the ones I focus on are normally to do with data loading and some backend algorithms (matching, pricing, etc). CRUD doesn’t consume much, so I never really optimise for it.

I don’t think PATCHwill ever exist in Bubble (it’s definitely not on the roadmap). As with all visual development tools, you are giving up some control for speed of development and patching just happens to be one of those things :smiley:

1 Like

It costs the same in WU to update a single field as it does to update 100 (or more).

So there’s no need to worry about this.

2 Likes