Load different pages based on conditional data?

Hi,

I’m curious if one of two possible pages could be loaded based on a data query when an input field is submitted.

I included a graphic to help explain what I’m trying to achieve, but here’s a longer explanation:

  • My web app tracks the stories and locations of numbered coins that are given for acts of kindness
  • If a user inputs a valid coin number, but has zero stories, I would like them to be sent to the form page to enter their story.
  • If a user inputs a valid coin number and there are one or more stories associated with that coin, I would like them to be sent to the coin tracking page.

I’m a Bubble.io noob, so I could be going about this the hard way. I’m open to any and all suggestions. Thanks!

Hello!

Easily done in Bubble.

Once you set up your dB model you should be able to do something similar to this:

when user’s stories count is 0 then go to page X … or when user’s stories count > 0 then go to page Y

Thank you for responding!

I understand the logic, but I’m not sure how to actually create that conditional event workflow from the input field. Also, would it be better to have a workflow initiated from a submit button?

Hi

This is easy. Your app needs too Show or Hide a group (the pages you want displayed)

look at this video for help on how workflows can show or hide an element.

1 Like

Complementing @andrew.mcdonagh great advice, I suggest you invest some time getting familiar with Bubble. Watch/read tutorials and also consider joining workshops.

Bubble is a powerful tool and it is tempting to go all out. I am not saying you should not go all out. I am suggesting you invest some time learning how to go all out. :+1:

Here a few great learning resources other than Bubble courses and workshops which I strongly recommend that you consider: