Forum Academy Marketplace Showcase Pricing Features

Load page only when data exists in DB

Hi All!

I am building an application where the user has an option to check and manage his existing booking. (Prior to this he made a reservation and he has an existing/valid/active Booking_ID in the DB).
On the page “login_my_booking” he gives his Booking_ID and mail address then he clicks on a button “Login”. I would like to set up the system to take him to the next page “manage_my_booking” but only in the case there is an existing = “Booking_ID” in the DB. If not, I want the system to display a message: “Sorry the given Booking ID doesn’t exists or the Booking ID doesn’t much the mail address.” I guess I set up the right conditions for this, but the page is loading even if the Booking_ID doesn’t exists.



What is wrong? Please help!

Hi @vflorian19,

I think you want something more like this…

To trigger your alert, perform the search and do this if the count is zero:

To perform the navigation, perform the search and do this if the count > zero:

You were evaluating the Booking_ID from the URL, but that doesn’t happen until the goto page is executed. You just need to evaluate the input box instead.

–Ken



Looking to accelerate your app development?

Development of Advanced Apps at https://uniqueideas.com or schedule a free intro session :gift:

Ken Truesdale
LinkedIn

1 Like

Thank you. That was quite helpful.