Display an Are You Sure? Warning Message

In some cases, you may want to prompt the user to confirm that he or she really wants to continue before performing an action. For example, say the application includes a button to change the status of the document or to send an email. This routine illustrates how to prompt the user with a message such as "Are you sure?" before continuing with the transaction.

How It Works

The @Prompt function can be used to return a trUE or FALSE value. When combined with the @IF statement, you can determine what action (if any) should be taken based on the user's response to the question.

Implementation

To implement this solution, create an action button on a form, view, or page. Insert the following code. Replace the @Prompt statements with commands to be issued based on the Yes or No response (see Figure 14.19). For example, if the user selects Yes, issue the @MailSend command.

result := @Prompt([YesNo]; "Continue?"; "Do you want to continue?");
@If (result = @True;
 @Prompt([Ok]; "Result"; "You selected YES.");
 @Prompt([Ok]; "Result"; "You selected NO."));

Figure 14.19. Example "Do you want to continue?" prompt

Note

A similar implementation can also be achieved using LotusScript. Refer to Chapter 13 for additional information pertaining to this subject.



An Introduction to the Lotus Domino Tool Suite

Getting Started with Designer

Navigating the Domino Designer Workspace

Domino Design Elements

An Introduction to Formula Language

An Introduction to LotusScript

Fundamentals of a Notes Application

Calendar Applications

Collaborative Applications

Reference Library Applications

Workflow Applications

Web Applications

Design Enhancements Using LotusScript

Design Enhancements Using Formula Language

View Enhancements

Sample Agents

Miscellaneous Enhancements and Tips for Domino Databases

Data Management

Security

Application Deployment and Maintenance

Troubleshooting

Appendix A. Online Project Files and Sample Applications

Appendix B. IBM® Lotus® Notes® and Domino®Whats Next?



Lotus Notes Developer's Toolbox(c) Tips for Rapid and Successful Deployment
Lotus Notes Developers Toolbox: Tips for Rapid and Successful Deployment
ISBN: 0132214482
EAN: 2147483647
Year: N/A
Pages: 293
Authors: Mark Elliott

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net