Wappler conditional workings

I’m using a conditional where, if the new value that comes is equal to the value that is registered in the database… This conditional must continue the workflow… Otherwise… It must pause and inform the error in the form, correct?

Print 1

Print 2

Note that the Database Update does not affect the database if the passwords are not the same, however, due to this condition… Wappler should return an error in the conditional, preventing the flow of the form from continuing and the same when inserting a Data = Error and show a notification applied… The notification should appear.

Is this my mistake or wappler’s? I’ve been at 6hrs just trying to sort this out.

I’m sure someone will give you a more elaborate response along with pointers to a tutorial, but let me help you a bit since you’ve been at this for 6 hours :stuck_out_tongue:

  1. Conditions don’t throw errors, they return a boolean value “true” or “false”
  2. If the condition is true, whatever is inside the Condition will run (Database Update)
  3. If the condition is false, whatever is inside the Condition will NOT run
  4. After the Condition step, there are no more steps, so the script is considered a successful run (no errors!)
  5. If you want to trigger a form error, you need to explicitly use the Response or Validate Data step
  6. Don’t forget you can also use Else in the Condition (right-click with the mouse in it)
2 Likes

Validate data return error in my config.