| Contents: | Main | Chapter | See Also: | Getting Started Manual | Advanced User Manual | |||
| Reference Type | Category | ICR # |
|---|---|---|
| Supported | ScreenMan | 10149 |
You can use the $$GET^DDSVAL extrinsic function only within a ScreenMan form, in all places where M code can be placed on the form.
The $$GET^DDSVAL 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 VA FileMan file/global.
For programming hooks at the field level (i.e., Branching Logic, Post Action, Post Action On Change, and Data Validation), you can use $$GET^DDSVAL to obtain values of other fields, but you cannot use it to obtain the old and new values of the current field. For the field currently being edited, use the following variables instead:
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 VA FileMan WORD-PROCESSING field.
COMPUTED fields in VA 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.
$$GET^DDSVAL(file,[.]record,field[,.error][,flags])
| 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). REF: The "Relational Navigation: Forward Pointers" section in the "ScreenMan Forms" section describes in detail the syntax accepted by ScreenMan to describe a relational jump via a DATA DICTIONARY 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 the field parameter is a WORD-PROCESSING field): |
|
| I | Return the Internal form of the data. (Default) | |
| E | Return the External form of the data. | |
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 (fictitious) 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: May 2026