View selection formulas restrict the documents that appear in a view. Only simple searches and a formula created with the Formula language can be used. You can access the view selection formula area by selecting it from the Objects tab in the Programmer's pane, or by clicking the Selection Conditions button in the toolbar. Clicking Simple Search and then the Add Condition button at the bottom of the Programmer's pane displays the Search Add Condition dialog box, shown in Figure 6.12. Multiple conditions can be strung together to create a fairly complex view selection formula. When you save a condition, it is entered in the formula window as a gray bar. If you combine conditions, you will notice additional conditions separated by a Boolean AND . You can edit the condition by double-clicking the text, and you can change the Boolean operator, for example, from AND to OR .
Figure 6.12. The By Field condition in the Add Condition dialog box shows the cCity field selected.
View selection conditions can also be built by using the Notes Formula language. In fact, you can see the Formula equivalents to the Simple Search selection conditions by switching from Simple Search to Formula. Take the following steps to create the selection condition:
To see the formula, click Formula in the drop-down list. Domino Designer displays the following formula:
SELECT ((Form = "form name") (Form = "FN"))
The default selection condition is SELECT @All , which selects all documents in the database. You can build far more sophisticated selection conditions with the Formula language than with Simple Search. The Add Condition dialog box is multipurpose and is used in many different places. Because the Add Condition dialog box is general purpose, some of the conditions are not very useful for view selection conditions. Multiple Words and Fill Out Example Form Used are two examples. These are better suited to creating full-text queries than to designing view selection conditions. Nevertheless, building selection conditions with the Search Builder does work for simple selections.
Using a selection formula that compares dates with today's date using @Today , for example, causes the Refresh icon to be constantly displayed because the value of @Today is constantly changing. Use the @Function @TexttoTime to convert the time value to a text value instead.
Part I. Introduction to Release 6
Whats New in Release 6?
The Release 6 Object Store
The Integrated Development Environment
Part II. Foundations of Application Design
Advanced Form Design
Using Shared Resources in Domino Applications
Using the Page Designer
Adding Framesets to Domino Applications
Automating Your Application with Agents
Part III. Programming Domino Applications
Using the Formula Language
Real-World Examples Using the Formula Language
Writing LotusScript for Domino Applications
Real-World LotusScript Examples
Writing Java for Domino Applications
Real-World Java Examples
Enhancing Domino Applications for the Web
Part IV. Advanced Design Topics
Accessing Data with XML
Accessing Data with DECS and DCRs
Security and Domino Applications
Creating Workflow Applications
Analyzing Domino Applications
Part V. Appendices
Appendix A. HTML Reference
Appendix B. Domino URL Reference