Implementing Application Logic

Hi all,

My first App (a Safety Management System) is pretty much built and whilst there are a couple of stubborn UI/UX niggles the final hurdle for me is implementing application logic.

So for example if a user marks a safety issue as ‘Closed’ I want them to be informed this will close the child records for hazards, risk controls etc. I want to then obviously go and update the status of these records to Closed also.

There could be other things like you can’t create a date on a risk control which predates the creation date on its parent hazard. In fact as I work through the application there will be a fair amount of this type of logic check.

My initial thoughts were that I would have to create a load of popups with the custom ‘error’ messages in but this seems like it will be a headache!! Also, if I need the check to be carried out on change of a specific item (which would be best) how would I implement this?

If there are any best practice approches for this type of thing I would be grateful!!



You could also look at “Progressive Disclosure”

So, for example, when they mark something as closed, you open up a panel below (show the element in Bubble speak) that they can then use the close the child records.

Not quite sure what you mean here.

Hello @dunnydf

Love quality/safety control systems. I have much experience implementing them in no code apps. Even created an mvp in Bubble with a dynamic form builder. :smiley:

So, your app is pretty much done. But you are now optimizing it and realize that additional logic is needed. Complementing @NigelG 's great suggestion you could also consider:

  • Prevent the user from doing something by disabling his/her ability to click a button. You can change a button from gray to blue (as an example) … where a grayed out button cannot be clicked until something else has been completed and blue tells the user that the button can be clicked.

  • Or alternatively … when the user clicks issue an alert to him/her that something else needs to be completed prior to the action being able to be executed. Restrict the action to take place until the “something else” has taken place.

1 Like


In terms of carrying out a check on change of a specific item I mean, for example, when the user changes a dropdown from open to closed they get a warning at that point to say ‘This action will close child records’. It isn’t a showstopper if this can only be done on submit of the page as long as I can stop the page saving so they have the chance to change it back again.

I think I can find ways of doing most of what is needed but I want the UX to be slick and I dont want a huge overhead of tons of popups just for custom ‘error’ messages.

I am assuming this type of thing is done regularly but examples seem to be thin on the ground.



Exactly. You don’t see them nowadays for a good reason. They suck(ed).

1 Like

Hi @cmarchan.

My plan always was to look at the business logic part last. In the first pass I built the data model, built the forms and implemented some of the basic validation and this all works pretty well (minus a couple of things I don’t like now I have learned more about how bubble works). As it stands the app is usable enough for me to capture all of the safety data I have currently sat in spreadsheets and documents. However, to improve the app it would benefit from applying additional logic in quite a few places.

It is an app that ony a small team will use so it isn’t essential but given I am using this example to learn Bubble I would still like to have a pattern for dealing with this type of thing.


Sorry, to just sharpen up the question I have on this one. What is the best way to make changes to a value on one thing after changing the value of another. So when it comes to changing the status of an issue in a popup I want to go off (even if it is after the issue has just been saved) and find one or mre related hazards and change their status too. I assume I can trigger a custom event on save of the issue popup?

Sorry if I wasn’t clear.

I think you can create a variable say isChange (with yes/no option) to indicate whether field A changed or not, then set condition to change field B if isChange is “yes”, then reset isChange to “no”.
I am not sure whether this is the best way, but it is one of the ways changes the related fields.

Hope this help.

Samson @ Plugin Developer
Plugin Page
Plugin Forum