VA FileMan V. 22.0 Programmer Manual Banner


 

Main Chapter Getting Started Manual Advanced User Manual

ScreenMan API


$$GET^DDSVAL( )

You can use this entry point only within a ScreenMan form, in all places where M code can be placed on the form.

This extrinsic function retrieves data from a data dictionary field. If the user has edited the field on the ScreenMan form, or if the form designer has modified the field with a PUT^DDSVAL call, the function returns the new value, even if the user has not yet saved the change to the database. If the field has not been edited on the ScreenMan form, the function retrieves the data from the FileMan file/global.

Text for a word processing field is moved into a global array and $$GET^DDSVAL returns the closed root of that array. The array has the same format as a FileMan word processing field.

Computed fields in FileMan files cannot be retrieved. To retrieve the value of a computed field defined on the form, use the $$GET^DDSVALF function.

If, while a form is running, a call to $$GET^DDSVAL fails, ScreenMan prints an error message in the Command Area.

Format
$$GET^DDSVAL(FILE,[.]RECORD,FIELD,.ERROR,FLAGS)
Input Parameters
FILE

(Required) The global root or number of the file or subfile. At the field level, the local variable DIE contains the current global root.

[.]RECORD

(Required) The internal entry number or an array of internal entry numbers. This parameter has the same form as the DA array. At the field level, the local array DA contains the current array of internal entry numbers.

FIELD

(Required) The field name or number or a relational expression that follows a forward pointer (e.g., POINTER:FIELD). The "Forward Pointers" section of the "ScreenMan Forms" chapter describes in detail the syntax accepted by ScreenMan to describe a relational jump via a DD field.

.ERROR

(Optional) $D(ERROR)>1, if the function call fails.

FLAGS

(Optional) Controls whether the internal or external form is returned, as shown below (the I and E flags have no effect if FIELD is a word processing field):

I Return the Internal form of the data. (Default)
E Return the External form of the data.
Examples

Example 1

Retrieve the internal form of the .01 field of the record currently being edited:

    S nmspNAME=$$GET^DDSVAL(DIE,.DA,.01)

Example 2

Retrieve the external form of field #20, record #362, in file #16000:

    S nmspDATE=$$GET^DDSVAL("^DIZ(16000,",362,20,"","E")

Example 3

Retrieve the text contained in a word processing field named DESCRIPTION:

    S nmspWP=$$GET^DDSVAL(DIE,.DA,"DESCRIPTION")

The text of the DESCRIPTION field is moved to the array as follows:

    @nmspWP@(0)=Header node of word processing field
    @nmspWP@(1,0)=Line 1
    @nsmpWP@(2,0)=Line 2
        ...etc.

 


Reviewed/Updated: March 4, 2007