You are here: Function Reference > Alphabetical Listing > Other > ?

?

Use this function to retrieve data from a record in the extract file. This function only uses the specified entry (LookUpName) in the XDB database to determine the:

Rule to use to retrieve the data (the default is the Move_It rule)
Search mask to use
Offset and length
Format mask

Syntax

?(LookUpName, Occurrence)

Parameter

Description

LookUpName

Specify the entry name in the XDB that defines the data to retrieve.

Occurrence

(Optional) Define which occurrence-record in the extract file to retrieve data from. You can omit this parameter for the first occurrence.

Note Keep in mind the XDB database must be structured to handle symbolic lookup. See the Using Dictionaries chapter in the Documaker Studio User Guide, which describes how to define extract file records and fields in the XDB database.

Assume you have these entries defined in the XDB:

spreadsheet

And the extract record, pol_rec, has the following data:

0...        1...         2...      5...   5...        9...
1...        0...         0...      0...   5...        0...
PolRec    GRA0001    Marion  V    Vanelli   09221957
PolRec    GRA0001    Sheryl  J    Vanelli   09211959
PolRec    GRA0001    Victor  M    Vanelli   12311981

Example

Assume the Driverfield has this script and uses the DAL rule.

Return ( ?("f_name") & " " & ?("m_initial") & ". " & ("l_name") );

The DAL script retrieves data from the XDB entries (1_f_name, 1_m_initial, and 1_l_name), which it concatenates with spaces and a period to form the driver’s name. The result is shown here:

Marion V. Vanelli

Example

In this example, assume there are ten fields (driver01, driver02, and so on) on the section, the first field includes this script and it uses the DAL rule.

Call ("drivers.dal")

The external DAL script (DRIVERS.DAL) contains these statements:

* Determine number of ‘pol_rec’ records exist in the transaction.

#drivers = CountRec("?pol_rec");
#occur   = 1;
*   Create the driver’s full name and store in appropriate * 
*   field.
While (#occur !> #drivers)
   d_name = ( ?("f_name", #occur) & " " & ?("m_initial" , #occur) /
            & ". " & ("l_name" , #occur) );
   field_name = "driver" & Format(#occur, ‘n’, ‘99’);
   SetFld (d_name, field_name);
   #occur += 1;
Wend;

This script determines there are three (3) records and would loop three (3) times; creating the driver’s name and storing it in the proper field. The results are shown here:

Marion V. Vanelli
Sheryl J. Vanelli
Victor M. Vanelli

Example

In this example, assume the License Issued field has this script and uses the DAL rule.

Return ( ?("issue_date") );

The DateFmt rule would be executed using specified format (11) and would return this result to the field:

September 21, 1957

See also