What is Confirmation Message

It is a message box that appears on your screen asking you to select either of the options 'Yes' or 'Cancel'.

Confirmation is most often used to confirm an important action that is taking place in your application . For example, they can be used to confirm an order submission or notify visitors that a button Clicked on 'Yes' will perform one action and if clicked on 'Cancel' will execute some other action.

Where to Use Confirmation Message

If you have a situation where you need to perform actions based on the user selection, You can use this confirmation message.

Ways of Showing a Confirmation Message:

1)  Clent Side. 
2)  Using PL SQL packages.
3)  Using ScriptUtil. 

1) Client Side:

  • Go to a page.
  • Create a button .
  • Now create a child to the button and select the item type as Message Box.
  • Specify the Closable, Header, Message and click on save button.

  • Go to preview page and click on save button.
  • A confirmation message pop's up as follows.




2) Using PL SQL packages:

  • Go to data source and enable the Confirmation Enabled in the Data Source.
  • Download the Package.

Confirmation Message

3. Your Package will have five extra parameters than the parameters that are there in your data source.

The five parameters are

p_confirmation_flag:- By default this value is null and if you want to raise a message then set the value as 'Y'.

p_confirmation_message:- The text that you specify here will be displayed as a message to the user.

p_confirmation_sequence :- Set any value as a p_confirmation_sequence.

p_confirmation_options:- The Options that you want to give to the user for example(Yes,No,Yes to All etc.,).

p_confirmation_token:- Name of the Confirmation message.

Eg:-

if(total > estimatedhours) then
IF p_confirmation_sequence IS NULL OR p_confirmation_sequence < 10 THEN
p_confirmation_flag := 'Y';
p_confirmation_message := 'Total working hours are more than what you have estimated i.e.,' || tempestimatedhrs || 'during creation of ' || temptask|| 'respectively!';
p_confirmation_sequence := 10;
p_confirmation_options := 'S:Yes';
p_confirmation_token := 'Hours Check';
RETURN;
END IF;
end if;

  • Checking if the (total > estimatedhours)
  • Default p_confirmation_sequence is null, So for the first time it will execute the if block.
  • Set the p_confirmation_flag as 'Y'.
  • Set the p_confirmation_message that you want to display to the user.
  • Set the p_confirmation_options as the you want to display to the user 'S:YES'. The Cancel Option is the default option that will appear on the message box.
  • Set the p_confirmation_sequence to a certain value.
  • p_confirmation_token is the name of the confirmation message.
  • RETURN will return the option(value) that user has selected.
  • If the user selected 'Yes' then the further execution continues.
  • If user Clicks on Cancel then the process will exit.
  • This is how the configuration Mesage is configured using the PL SQL packages.


3) Using ScriptUtil:

  • At server side validation,we need to call confirmationMessageBox method.
  • Following is the signature of the method .public void confirmationMessageBox(String confirmationMessage, String confirmationOptions, double confirmationSequence,String confirmationToken, String cancelButtonText)
  • Param1-confirmationMessage:It’s a message that you want to display to the user.
  • Param2-confirmationOptions:It’s a button option which will come in your message box.

                 Like,”Y:Yes,N:No”.

  • Here “Y” and “N” is the id which you will get when user will select respective button.
  • Param3- confirmationSequence,:It’s a simple double value which you want to use for your refrence.
  • Param4- confirmationToken,:It’s a simple string value using which you can distinguish your message box.
  • Param5- cancelButtonText,:It’s a text for cancel button.If user clicks on this button then no action will be performed.If you pass null then default value is ‘Cancel’.
  • Following is snap shot of the server side validation script for confirmation message box. 



Location

101 California Street, Suite 2710
San Francisco, CA 94111


440 N. Wolfe Rd.
Sunnyvale, CA 94085


Office 11, 5th Floor, Building 9,
Mindspace IT Park
Hyderabad 500081

p: +1 (844) AT CloudIO (844-282-5683)
f: +1 (650) 300-5247 | e: sales@cloudio.io
© 2009, 2017 CloudIO Inc. | Terms of Use | Privacy Policy