Check before "creating a new thing"

Hey folks. New bubbler here. I’m creating a form that allows users to score their organisation against a series of statements using sliders. I’ve created a data type to store the integer values called “Impact”, but I want each user to only have one “impact”. I’ve got a workflow to “create a new thing” when I hit a save button, but what I’d really like to do is on page load, check to see if the current user has an “impact”, and if so, set the sliders based on what’s in the database. If not - create a new “impact” with the initialised slider scores as one, for a user to then overwrite.

Does that make sense? If so, can anyone help?

  1. Add a custom state to the page called “Existing User” of type yes/no default to no.
  2. When you load the page, if the user exists and has an impact, set the custom state to yes.
  3. Then within your slider inputs, leave the initial value as blank, and add a condition that says when the pages Existing User is yes, set the initial value to their existing impacts.

Thanks pal. I guess the part I am stuck on is the “…if the user has an impact” bit of that – I’m not sure how to check that…

If impact’s value is empty
If impact’s value is not empty


Thanks very much for your help! I’m wondering: where do you check the conditional? Normally, I’d just create an if statement, but I’m not sure how to do that in a no-code environment…

In elements, in flows, in privacy rules, … many places :grinning:

Bubble is considered by its founders as a visual programming language … a blank canvas contrary to how block app builders work. So … yes it is no code but they differentiate themselves from most no code platforms in this way.

Once you become familiar with it you may agree with them :+1:t2:

Here a few 1-min videos on expressions:

Also, a quick series of instructional short videos might prove useful: