Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Engineering

Database Selector Gadgets

  • Last UpdatedOct 30, 2024
  • 2 minute read

A database selector is a special kind of list gadget. It provides a mechanism for displaying the current database element along with its owner and members. You can also interact with a selector to change the current element.

A single-choice selector permits only one selected value at a time. A typical example is the AVEVA E3D Members List.

A multiple-selector could be used to display the results of querying database attributes or to select a group of elements for modification.

Its definition is similar to list gadgets.

selector .Mem 'members:' SINGLE width 12 height 8 DATABASE

selector .Mem SINGLE width 12 height 8 DATABASE OWNERS

selector .Mem SINGLE width 12 height 8 DATABASE MEMBERS

selector .Mem AT . . . SINGLE width 12 height 8 DATABASE AUTO

selector .Mem AT . . . MULTIPLE width 12 height 8 DATABASE

selector .Mem callback '!this.MyList(' MULTIPLE width 12 height 8 DATABASE

The DATABASE keyword is mandatory.

The owners and members keywords are optional. By default, a database selector displays the current element together with elements both above it and below it in the database hierarchy. If present, the owners keyword specifies that only elements above the current element are shown. If present the members keyword specifies that only elements below the current element are shown.

If auto is specified, the selector automatically refreshes its displayed contents whenever the current element of the database changes. If absent, the contents of a selector remain as they were when the gadget was initially displayed until the gadget is explicitly refreshed by your PML code. The auto keyword and the multiple keyword cannot be used together.

To set and get selected values for a selector use the select() and selection() methods, and the .val members, as done for lists. For example, to access the currently selected value of a single-selector gadget:

!element = !This.Members.selection()

Note:
For a selector gadget, the Rtext and Dtext are always the same as one another.

Related Links
TitleResults for “How to create a CRG?”Also Available in