Have you @emmanuel ever thought about creating workflows for Fields and Data Types?
Let’s call it “Data Workflows”
The idea here is to be able to double-click on the data type or its fields to bring the workflow screen specific for these objects (and also have a data workflow tab). This would allow us to create workflows for data manipulation system-wide, saving us the trouble of having to worry about these rules and actions for every page you create.
In my applications for example, if a person was less than 18 years-old at the time of arrest, his records cannot be displayed anywhere to anyone. So, in all the reports and data views I create, I always must remember to add this extra logic to make sure “minor” cases are not displayed.
But with Bubble’s new Data Workflow, I could just go to “Data Type Workflow” and add an action to HIDE all records where defendant’s age is less than 18 years of age at the time of arrest.
So, imagine I could go to “DATA” tab and double-click on my “Defendant” table and click on “add/edit workflow” for my entire table. Then I could enter the following condition (or rule):
If Defendant.Age_at_Arrest < 18
And the following action:
“hide record from all”
Another example could be for a web app that sells alcoholic beverages, or adult material. You could just go to your data tab, user table, add a field for “Age”, double click on it and enter the following workflow:
Rule: If User.Age < 21
Action: ERROR ‘You must be 21 years old or over to continue’
So, no matter which screen you create, if the user’s age is created or modified to be less than 21 years of age, an error would be generated.
LineItem.Total = LineItem.Price * LineItem.Quantity
Define calculated fields. In this case, there is no condition. Just an action based on other fields. Whenever Price or Quantity gets added/changed, Total gets updated. You never have to worry about it again on any screen:
Condition: Reservation.Status CHANGES TO ‘New’
Action: SEND ReservaitonOfferEmail TO Reservation.Member
You just set this once at the data level. Now, whenever the status of any of your members or client’s reservation changes to NEW, an email is sent to them automatically. No need to worry about it in different pages.
Client.FullName = Client.FirstName+’ '+Client.LastName
Anywhere in your app, when Last, First is added/changed, it updates The “FullName” field.
The applications are endless…
Let me know what you all think.