Best approach to keeping a Satellite / Search Data Type up to date?

I’m creating an extra data type to speed up a search I have - as my app has scaled it has become very slow as I use advanced filters etc. to drill down and filter by information in related data types.

In this particular search users can look up People (data type), however, there are several filters they can apply which use other data types.

Scenario:
Data Type: Person
Data Type: Memberships

What is the best approach to keep the Search Data Type up to date? In SQL I’d use a trigger or something to say “If this field is updated, also update this field”. I’m thinking I should run everything through an API workflow, so that for example ‘Update Person’ updates several things: Person, Search Data Type etc.

I’m looking for an answer that will be most lightweight, both in terms of workflow units and management/maintenance overhead.

I’ve read the book by Petter Amalie, however, it doesn’t go into this detail.

Thanks :slight_smile:

You can do something similar in Bubble; it’s a workflow action called ‘An Input’s value is changed’:

Choose the input to watch, and then set the step for what to change if that input changes. You could also have all the steps pre-defined in a Custom Event, and just use the input to trigger the custom event:

image

Thanks mate, this looks helpful - I have some questions:

  1. I assume this replaces the need for the auto-bind feature? Does it provide the same functionality, but ability for additional workflow steps.
  2. Is there a way to have this watch a field in the database, rather then the UI? As an example, say there are 3 different screens a player’s name can be updated (Sign up / User account update / Admin update). Using ‘an Input’s value is changed’ requires me to watch 3 inputs, where as if I can say ‘when this field in the database is changed’ requires me to watch 1 field.
1 Like

Oh, looks like this is the answer: [Public Beta] Database change triggers - Announcements - Bubble Forum

1 Like

Looks like you found the answer, but yes! I actually replaced auto-binding on my app with this, since it made the process more WU-efficient by only triggering 1 change.

Looks like you found your answer there!