Page 1 of 1

Navigate to new page when query fails

Posted: Mon Mar 06, 2017 8:47 am
by Mike Kastens

Hello -

I am searching my database for zip code entered by the user. The query works fine and I set the result to a storage variable. This is, however, when the zip code is contained in the database. If the user enters a zip code that is not contained in the database I would like to navigate to another page. What is the best way to do this?

All help is much appreciated,

Mike


Navigate to new page when query fails

Posted: Mon Mar 06, 2017 6:05 pm
by Serhii Kulibaba

Hello Mike,

Sure, it is possible. Please add a JS code below to the success event to navigate user to another page if there are no results:
preif (!data.length){
Apperyio.navigateTo("nextPage");
}/pre
here nextPage - name of the page, you need to navigate user, if there are no results