VA FileMan V. 22.2 Programmer Manual Banner


 

Main Chapter Getting Started Manual Advanced User Manual

Database Server (DBS) API


FDA^DILF(): FDA Loader 

Reference Type Category ICR #
Supported Database Server (DBS) 2054
Description

The FDA^DILF API can be used to load data into the FDA. It accepts either the traditional DA() array or the iens input parameter for specifying the entry. No validation of the value input parameter is done.

Formats
1. FDA^DILF(file,iens,field[,flags],value,fda_root[,msg_root])

2. FDA^DILF(file,.da,field[,flags],value,fda_root[,msg_root])
Input Parameters
file

(Required) File or subfile number.

.da

(Required for format 2) DA() array containing entry and subentry numbers.

iens

(Required for format 1) Standard IENS indicating internal entry numbers.

field

(Required) Field number for which data is being loaded into the FDA.

flags

(Optional) Flag to control processing:

R Record identified by iens or .da is verified to exist. Do not use the R flag if the IENS or DA() array contain placeholder codes instead of actual record numbers.
value

(Required, can be NULL) Value to which the FDA node is set. Depending on how the FDA is used, this could be the internal or external value. For WORD-PROCESSING fields, this is the root of the array that contains the word-processing data. Internal and external values cannot be mixed in a single FDA.

fda_root

(Required) The root of the FDA in which the new node is loaded.

msg_root

(Optional) Root into which the following arrays are put:

  • Error
  • Help
  • Message

If this parameter is not passed, these arrays are put into nodes descendent from ^TMP.

Output

Successful completion of this call results in the creation of a node descendent from the root passed in fda_root. The format of the node is:

Figure 186: FDA^DILF API—Node Format

    FDA_ROOT(FILE,"IENS",FIELD)=VALUE

REF: For more information on the format of the FDA, see the "Introduction" in the "Database Server (DBS) API" section.

By default, error messages are returned in ^TMP. If msg_root is passed, messages are returned there.

Example

The example in Figure 187 loads the FDA for the first sub-subentry in the second subentry of entry number 4 for Field #4 in (fictitious) subfile #16200.32 with a value of "NEW DATA" [the FDA is descended from ^TMP("MYDATA",$J)]:

Figure 187: FDA^DILF API—Example: Input and Output

    >S FILE=16200.32,IENS="1,2,4,",FIELD=4,VALUE="NEW DATA",ROOT="^TMP(""MYDATA"",$J)" <Enter>

    >D FDA^DILF(FILE,IENS,FIELD,"",VALUE,ROOT) <Enter>

    >D ^%G <Enter>

    Global ^TMP("MYDATA",$J
            TMP("MYDATA",$J
    ^TMP("MYDATA",000101456,16200.32,"1,2,4,",4) = NEW DATA
Error Codes Returned

Table 62 lists the possible error codes returned with the FDA^DILF API:

Table 62: FDA^DILF API—Error Codes Returned

Code Description
202 One of the input parameters is not properly specified.
401 The file does not exist.
501 The field does not exist.
601 The entry does not exist.

 


Reviewed/Updated: May 2026