Conditional navigation.
I would like to have a view that requests one of two things, License plate number and/or a Last name.
With a Search button in the footer, on click I would like to determine whether a License plate was entered, if so retrieve data from the server, if found I would like to transition to the vehicle view, if not found display an error on my current view. I a Last name was entered I would like to do the same process but display the customer view on success.
How would I set up the buttons to call a common function, and programmatically switch views or re-display the current view if there is an error?
I would like to have a view that requests one of two things, License plate number and/or a Last name.
With a Search button in the footer, on click I would like to determine whether a License plate was entered, if so retrieve data from the server, if found I would like to transition to the vehicle view, if not found display an error on my current view. I a Last name was entered I would like to do the same process but display the customer view on success.
How would I set up the buttons to call a common function, and programmatically switch views or re-display the current view if there is an error?