Creating Shared Fields

Shared fields are useful when you anticipate using the same field on multiple forms. When you share a field, it shares the properties and the formulas for the field, not just the data. Generally, shared fields are used when the field has a complicated formula and it will be used (shared) in multiple forms. You can add a shared field to a form or subform from the Design menu, or you can turn a field that has already been created into a shared field. In Designer 6, you can add a shared field to a database using the New Shared Field button in the Designer IDE, as shown in Figure 7.16.

Figure 7.16. Creating a new shared field in a Domino 6 database.

graphics/07fig16.jpg

After the shared field has been added to the database and is listed in the Work pane, it can be inserted into a form or subform by choosing Create, Resource, Insert Shared Field on the menu bar, as shown in Figure 7.17.

Figure 7.17. How to create a new shared field in a Domino 6 database.

graphics/07fig17.jpg

To create a shared field from an existing field on a form, using the Design menu, select Share This Field from the menu bar. Open the properties box for the field to define the field's properties. You assign a formula to the appropriate event as you normally would for a regular single-use field; the only difference when using a shared field is that the Design pane does not appear in the IDE because you are not working in a form (see Figure 7.18).

Figure 7.18. The shared field design looks similar to the design of a single-use field, except that a shared field has a thicker border around the perimeter of the field.

graphics/07fig18.jpg

Shared fields can be renamed , with all instances of the field's name updated in all forms to reflect the name change. Shared fields also can be deleted, copied , accessed on the back end through LotusScript, created using @Command([DesignSharedFields]) , used in multilingual databases to support different languages, or converted to or from a single-use field. Shared fields often also help to reduce code maintenance in a database. A shared field can be any field type as a single-use field, such as Text, Computed for Display, Computed, and so on.

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

Forms Design

Advanced Form Design

Designing Views

Using Shared Resources in Domino Applications

Using the Page Designer

Creating Outlines

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 JavaScript for Domino Applications

Real-World JavaScript 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



Lotus Notes and Domino 6 Development
Lotus Notes and Domino 6 Development (2nd Edition)
ISBN: 0672325020
EAN: 2147483647
Year: 2005
Pages: 288

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