English Reference > List Processing Commands > FORM-LIST

Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

Reality V15.0 ()

FORM-LIST Command (English) (m618305+formlist.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

FORM-LIST

Generates a select list from the attributes in a specified item.

Syntax

FORM-LIST file-specifier item-id {(n}

Syntax Elements

file-specifier as defined in General Conventions.

item-id is the name of the item.

Option

n is the number of the attribute from which the list is to start. It must be preceded by an open parenthesis. The default is attribute 1 if n is omitted.

Prompt

If you enter the command without specifying an item-id, the processor prompts:

ITEM ID:

Type the name of the item and press RETURN.

Error Messages

If you do not enter a file name, the processor displays:

[200] FILE NAME?

If you enter an invalid file name, the processor displays:

[201] 'file-name' IS NOT A FILE NAME

After an error message, control returns to TCL.

Comments

FORM-LIST is similar in function to GET-LIST. However, you can use FORM-LIST directly on any file to form an active list from the attributes of a specified item.

FORM-LIST is generally used to create a select list from a list of item-ids generated by an application program, Proc, or the EDITOR.

Examples

Assume a list of customers selected on the basis of telephone area code was generated by an application program and saved in item AREACODE of file CUSTS. The item-ids in the original file are made up of a customer number with a suffix for the state where the customer resides.

Example 1

:FORM-LIST CUSTS
ITEM ID: AREACODE
55 ITEMS SELECTED.
>

A select list is generated from the contents of all the attributes in the item AREACODE.

Example 2

In this example item-ids in attributes 54 and 55 of the item AREACODE are selected and the associated items are displayed by use of the COPY command.

:FORM-LIST CUSTS AREACODE (54
2   ITEMS SELECTED.
>COPY CUSTS
TO: <Return>
     1234-CA
001  CANTRELL, INC.
002  3004 MAGNOLIA
003  SANTA ANA, CA 92712
004  714-555-6000
     9789-CA
001  BROWN TOOLS, INC.
002  34 MAIN ST.
003  ANAHEIM, CA 92722
004  714-555-6666

RealityV15.0Comment on this topic