User confirmation actions and conditional statements

  • 20 February 2017
  • 0 replies
  • 1 view

Badge +12


 

Symptoms


User confirmation actions and conditional statements
 

Diagnoses


Will it be possible to confirm if this scenario is as expected?

"If the user clicks cancel on a user confirmation message within the TRUE section of the conditional statement, it will then fall into the FALSE section of the conditional statement."

You notice this happening and thought it was rather odd. For example you could have:

If the logged in user = User1
then ask the user for confirmation if they want to send the email
Else
send the email automatically.

So if the user User1 presses "cancel" on the confirmation request, then it will actually just send the email because it falls into the else part of the conditional statement.
 

Resolution

This is currently the expected behaviour.
Here is a basic outline of the behaviour that can be found in the user guide (http://help.k2.com/onlinehelp/k2smartforms/userguide/4.7/default.htm#sf_-_rule_designer_-_actions.html😞

When using a notification action such as Get confirmation from user for example which displays an OK and Cancel button, rules can be created to perform a follow-up action depending on the button selected on the confirmation dialog. Any rules listed after the rule to show the confirmation dialog will execute if the OK button is clicked. NO rules after the confirmation dialog rule will execute if the Cancel button is clicked.

When using the confirmation dialog rule in an IF statement, the TRUE section will execute if the OK button is clicked, and will execute the ELSE section if the Cancel button is clicked.

If you want to have a confirmation within an If statement, you can follow the following steps:

Workaround:

- Create a new unbound rule (remove the event) and call it "Confirmation"

- Set up your confirmation as follows:

- if an advanced condition is true (1 = 1)

then Get Confirmation from the user

actions if true

else

actions if false

- In your main action where you want to use the confirmation:

- if (condition)

actions...

then Execute another Rule (Confirmation)

Else

actions...




 

0 replies

Be the first to reply!

Reply