home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR36 / C7101.ZIP / CLARION.TXT < prev    next >
Text File  |  1994-01-31  |  207KB  |  5,378 lines

  1.  
  2. <<Global Settings>>
  3. <General Information>
  4.  
  5. The information you provide in the prompt fields on the
  6. Global Settings window are used throughout the application.
  7. These affect source code generation for the Global CODE
  8. section of the application, and the generated source code
  9. for all procedures.
  10.  
  11. <Property Fields>
  12. Property Fields
  13.  
  14. <  Enable Shared Files>
  15. [√] Enable Shared Files
  16.      Check this box to indicate that the application will
  17.      be used in a multi-user environment.  This could be a
  18.      Network, Multi- user operating system, or a single-user
  19.      Multi-tasking operating system.  When checked, all data
  20.      files in the application are OPENed in shared access
  21.      mode 42h (Read/Write Deny None) instead of exclusive
  22.      access mode 22h (Read/Write Deny Write).
  23.  
  24. <  Enable Mouse Support>
  25. [√] Enable Mouse Support
  26.      Check this box to indicate that the application will
  27.      allow the user to use a mouse.  This places a
  28.      SETMOUSE(1,1) statement in the Global CODE section.
  29.  
  30. <  Enhanced Background?>
  31. [√] Enhanced Background?
  32.      Check this box to indicate that the application will
  33.      be run on an EGA, VGA, or SVGA monitor which allows the
  34.      Blink bit to be used as background color Enhance bit
  35.      (see SETNOBLINK in the Language Reference).
  36.  
  37. <  Close Unused Files?>
  38. [√] Close Unused Files?
  39.      Check this box to indicate that each procedure should
  40.      close the data files which it opens.  When this box is
  41.      checked, CheckOpen() is generated as a FUNCTION
  42.      returning one (1) if it actually opened the file, or
  43.      zero (0) if the file was already open or unable to be
  44.      opened.  If not checked, CheckOpen is generated as a
  45.      PROCEDURE.
  46.  
  47.      The return value from the CheckOpen() function is
  48.      saved in a local variable by each procedure.  That
  49.      saved value is checked just before RETURN to its
  50.      calling procedure -- if the procedure opened the file,
  51.      it also closes the file.
  52.  
  53. <  If File Not Found:>
  54. If File Not Found:
  55.      Select the action to take when the application
  56.      attempts to open a non-existing data file.
  57.  
  58.      () Create  -- Attempts to CREATE the file
  59.      () Halt -- Displays a warning then returns to DOS.
  60.  
  61.  
  62. <  Program Author:>
  63. Program Author:
  64.      Enter the programmer's name for documentation purposes.
  65.  
  66. <Embedded Source>
  67. Embedded Source
  68.  
  69. <  Inside Global MAP>
  70. "Inside Global MAP"
  71.      In the Global data section of the program at the end
  72.      of the MAP structure.  This may be used to declare any
  73.      Global procedure prototypes (or INCLUDE a file
  74.      containing them) that the Application Generator does
  75.      not automatically include in the MAP.
  76.  
  77. <  Data Section >
  78. "Data Section"
  79.      In the Global data section of the program after Global
  80.      data and all data file definitions.  This may be used
  81.      to declare any Global data which you may want to use
  82.      only in your embedded source code.
  83.  
  84. <  Setup Program>
  85. "Setup Program"
  86.      Immediately after the CODE statement.
  87.  
  88. <  Before Return to DOS>
  89. "Before Return to DOS"
  90.      After the call to the first procedure and immediately
  91.      before the RETURN statement which takes the user back
  92.      to DOS.
  93.  
  94.  
  95. <<The Batch Template>>
  96. <General Information>
  97.  
  98. The "Batch" template generates a procedure which will loop
  99. through a file and perform an operation on each record.
  100. This template is designed to allow changing or deleting a
  101. group of records with no hand coding.  However, there are
  102. many embedded source code points to give the programmer
  103. maximum flexibility.
  104.  
  105. CAUTION: It is a very good idea to make a backup copy of
  106. your data files before running a batch Change or Delete and
  107. NEVER test these procedures on live data without first
  108. making a backup.
  109.  
  110. <Formatter Support>
  111. Formatter Support
  112.  
  113. The Screen Formatter contains a default screen design
  114. containing two display fields, and Ok and Cancel buttons.
  115. The Pulldown Menu Formatter and Report Formatter are not
  116. supported.
  117.  
  118. <Property Fields>
  119. Property Fields
  120.  
  121. <  Range Limit Field>
  122. Range Limit Field:
  123.      The range of records to be processed can be limited by
  124.      fixing the value of a component of the primary file access
  125.      key. For example, line items on an invoice can be
  126.      limited to a single invoice.  The key for the item file
  127.      might contain ITM:Invoice and ITM:Line containing the
  128.      invoice number and line number of the item.
  129.  
  130.      ITM:Invoice would be the Range Limit Field, displaying only
  131.      those records for a fixed invoice number. The Range
  132.      Limit Field will be assigned the Range Value Field for
  133.      this limit.
  134.  
  135. <  Range Value Field>
  136. Range Value Field:
  137.      The Range Value Field is the field which holds the
  138.      value to be used as the limiting key component value.
  139.      The key component will be assigned this value.
  140.  
  141.      In this example, the current Invoice record might
  142.      contain the number of the invoice that is being
  143.      displayed.  INV:Number would be the Range Value Field,
  144.      supplying the value for the Range Limit Field.  The
  145.      Range Value Field must not be the same field as the
  146.      Range Limit Field.
  147.  
  148. <  Record Filter>
  149. Record Filter:
  150.       You may enter a record filter expression here. If
  151.       the Delete action is selected, and you enter
  152.  
  153.          CUS:State = 'FL'
  154.  
  155.      as the filter, then all customers with the state code
  156.      of 'FL' will be deleted.
  157.  
  158.      No validation is done on the code you enter -- an
  159.      invalid expression will generate compiler errors.  If
  160.      you are not familiar with the Clarion language
  161.      statements or expressions, do not use this entry --
  162.      use a Formula field with the FILTER Formula Class
  163.      instead.
  164.  
  165. <  Action for Batch>
  166. Action for Batch:
  167.      The batch process may either change or delete records.
  168.  
  169.      'Change' will PUT each selected record.
  170.      'Delete' will DELETE each selected record.
  171.      'No Action' will not PUT or DELETE the records.
  172.  
  173. <  Show Record Counter>
  174. Show Record Counter:
  175.      Check this box to display a record counter as the
  176.      records have been successfully changed or deleted.
  177.      Displaying a variable on screen within the main process
  178.      LOOP can slow the batch process slightly.  Therefore,
  179.      you may leave this check box blank and have no screen
  180.      updates within the LOOP.
  181.  
  182. <Embedded Source>
  183. Embedded Source
  184.  
  185. <  Data Section >
  186. "Data Section"
  187.      In the data section of the procedure after local data,
  188.      the screen and pulldown structures.  This may be used
  189.      to declare any data which you may want to use only in
  190.      your embedded source code.
  191.  
  192. <  Setup Procedure>
  193. "Setup Procedure"
  194.      Immediately after the CODE statement.
  195.  
  196. <  Setup Screen>
  197. "Setup Screen"
  198.       After the OPEN(Screen) statement.
  199.  
  200. <  Before file SET() >
  201. "Before file SET()"
  202.      Before the SET which will determine the file
  203.      processing order.  This embedded source is the ideal
  204.      place to fill key values for a multiple component key
  205.      SET.
  206.  
  207. <  Before LOOP >
  208. "Before LOOP"
  209.      After the SET command but before the main LOOP. At
  210.      this location you may override the SET statement, or
  211.      enter any LOOP setup code.
  212.  
  213. <  NEXT Record Error Check >
  214. "NEXT Record Error Check"
  215.      Immediately after the NEXT command. This allows a
  216.      check of the ERRORCODE() function to insure that there
  217.      were no errors.
  218.  
  219.      WARNING: If no error check is made here to allow a
  220.      BREAK out of the loop, you WILL get an infinite loop!
  221.  
  222. <  Within LOOP >
  223. "Within LOOP"
  224.      After the GET to any secondary files. This is the
  225.      heart of the processing LOOP.  If using a record
  226.      filter, this code may not always be executed if the
  227.      record is filtered out. If Many to 1 relationships
  228.      exist in the File Schematic, the lookups will have
  229.      already been done.  Any formulas created with the
  230.      formula formatter (except FILTER) will have been
  231.      executed just prior to this embedded source code.
  232.  
  233.      The next statement which executes after this code is
  234.      the PUT or DELETE of the record if Change or Delete has
  235.      been selected for this batch.
  236.  
  237. <  PUT/DELETE Record Error Check >
  238. "PUT/DELETE Record Error Check"
  239.      Immediately after the PUT or DELETE commands. This
  240.      allows a check of the ERRORCODE() function to insure
  241.      that there were no errors replacing a record.  If you
  242.      are changing fields which are the components of unique
  243.      keys, or if you are running this batch process on
  244.      shared files, you may enter your own error handling
  245.      scheme here.  If 'No Action' was selected for this
  246.      batch process, this embedded code window is not
  247.      needed.
  248.  
  249. <  End of Procedure >
  250. "End of Procedure"
  251.      Code placed in this window executes after all other
  252.      code in the procedure has executed.  At this point, the
  253.      Report is closed.  This code begins in column one,
  254.      therefore you may use this window to write any ROUTINEs
  255.      which are called from any other embedded source code
  256.      window.
  257.  
  258. <  When Screen Field is Selected : >
  259. "When Screen Field is Selected : "
  260.      In the CASE SELECTED() structure, executed when the
  261.      field is selected for entry.
  262.  
  263. <  When Screen Field is Completed: >
  264. "When Screen Field is Completed: "
  265.      In the CASE FIELD() structure, executed when the field
  266.      has been completed.
  267.  
  268. <Formula Classes>
  269. Formula Classes
  270.  
  271. <  FILTER >
  272. FILTER
  273.      A Conditional Field with "FILTER" in the Formula Class
  274.      field is used to select which records are processed.
  275.      If the Condition expression evaluates to zero (false)
  276.      for a given record, it is not processed.
  277.  
  278. <  No class (blank) >
  279. No class (blank)
  280.      Calculates the formula every time a record is
  281.      processed.
  282.  
  283.  
  284. <<The Browse Template>>
  285. <Brief Description >
  286. Brief Description
  287. ─────────────────
  288.  The "Browse" template uses a "List box" to display a
  289.  scrollable list of records.  The default Browse screen
  290.  has "Add", "Change" and "Delete" pushbuttons which call an
  291.  "Update" procedure to allow users to update a data file,
  292.  and a "Select" button to allow users to "Select" a
  293.  record from the list.  The "Select" button is dimmed
  294.  unless the Browse procedure is called as a "lookup" from
  295.  an entry field.
  296.  
  297. < Condensed Explanation of Prompts>
  298. Condensed Explanation of Prompts
  299. ┌──────────────────────┬─────────────────────────────────┐
  300. │Prompt                │      Explanation                │
  301. └──────────────────────┴─────────────────────────────────┘
  302.  
  303.  Module Name      :    Name of the .CLA source file where
  304.                        this procedure is generated.
  305.  
  306.  Range Limit Field :   Name a KEY field used to "limit" the
  307.                        records shown in the List box.  The
  308.                        field must be a component of the
  309.                        Browse "Access Key".  Records are
  310.                        included in the Browse if they have a
  311.                        KEY value which matches the value of
  312.                        this field.
  313.  
  314.  Range Value Field :   If you name a field here, then
  315.                        records are included in the Browse
  316.                        if the "Range Limit" field contains
  317.                        a value EQUAL to the "Range Value"
  318.                        field.
  319.  
  320.  Record Filter    :    Enter a valid Clarion language
  321.                        expression.  Record filters are used
  322.                        to Browse a subset of the data file.
  323.                        Each record from the data file will
  324.                        be evaluated against this expression
  325.                        for inclusion in this list.
  326.  
  327.  Locator Field    :    A Locator field is used to position
  328.                        the highlight bar to a particular
  329.                        section of the data file.  Name a
  330.                        KEY field component of the Browse
  331.                        "Access Key".  The Locator field
  332.                        should be placed on the Browse
  333.                        Screen as an Entry field AFTER the
  334.                        List box.  The closest match to this
  335.                        field is found after the user hits
  336.                        the TAB key.
  337.  
  338.                        *If your Locator field is a Numeric
  339.                        field, you should add the 'B'; to
  340.                        blank if zero, to the picture token.
  341.  
  342. [√] Incremental Locator : Check this box if you want the
  343.                           "Locator field" to be activated
  344.                           each time the user enters a
  345.                           keystroke.  The Locator remains
  346.                           active while the List box is
  347.                           selected. The "Locator" field MUST
  348.                           be placed AFTER the List box in
  349.                           the Field List.  Any user
  350.                           keystrokes are used to immediately
  351.                           seek the closest match in the data
  352.                           file, and re-position the
  353.                           highlight bar in the List box.
  354.  
  355.                        *If your Locator field is a Numeric
  356.                        field, you should add the 'B'; to
  357.                        blank if zero, to the picture token.
  358.  
  359.  Update Procedure :    Name a procedure that is called when
  360.                        the user hits the "Add", "Change",
  361.                        or "Delete" pushbuttons.
  362.  
  363. [√] Enable Hot Records  : Check this box if you want the
  364.                           Browse procedure to re-read the
  365.                           data file record every time the
  366.                           highlight bar is moved.  Use this
  367.                           option if you place data fields
  368.                           outside the List box.  For
  369.                           example you could use this option
  370.                           if you want to display a MEMO
  371.                           field for the highlighted record.
  372.  
  373.                           You can also use this option if
  374.                           you are using a Hotkey or
  375.                           Pushbutton to call another
  376.                           procedure, that acts upon the
  377.                           highlighted record.
  378.  
  379. [√] Enable Total Embeds : Check this box if you have used
  380.                           any of the following Embedded
  381.                           Source points to calculate
  382.                           totals from the data file:
  383.  
  384.                "Set to First Record Before Total Loop"
  385.                "Inside Total Loop, Immediately After Next()"
  386.                "Inside Total Loop, After Filter"
  387.  
  388.                           Code is generated to read the
  389.                           data file, and execute the
  390.                           embedded source code prior to
  391.                           the List box being displayed.
  392.  
  393.                           To keep the total accurate when a
  394.                           user ADDs, CHANGEs, or DELETEs a
  395.                           record, you also need to add code
  396.                           to the Embed points:
  397.  
  398.               "Prior to Update Procedure"
  399.               "After Update Procedure"
  400.  
  401. [√] Disable Memo Access : Check this box if the data file
  402.                           has a Memo field, and you are not
  403.                           displaying the Memo on the Browse
  404.                           screen. This improves performance
  405.                           when scrolling the List box.
  406.  
  407. <Detailed Description>
  408. Detailed Description
  409. ────────────────────
  410. The "Browse" template generates a procedure to display
  411. records from a data file in a List box.   Each line in the
  412. List box displays fields from one record of the data file.
  413. Each line in the List box can be scrolled left or right
  414. using the arrow keys or the List box horizontal scroll bar.
  415. Records are displayed in the List box in KEY order.   The
  416. KEY that is used is identified as the "Access Key"  on the
  417. File Schematic dialog (accessed by the "Files" pushbutton).
  418.  
  419. The List box isn't filled with records until it is selected.
  420. You can place Fields before the LIST box, but the first
  421. page of records isn't displayed until the List box is
  422. selected.
  423.  
  424. The "Insert", "Change", and "Delete" pushbuttons, or any
  425. other field that processes a record selected from the List
  426. box must be placed after the LIST box in the field list.
  427. To see the order Fields will be processed for your screen,
  428. enter the Screen Formatter and type Ctrl-F.
  429.  
  430. The "Select" button is activated if the Browse is called
  431. with KEYCODE() set equal to ShftEnter (Shift and Enter).
  432. KEYCODE() is set equal to ShftEnter when a Procedure is
  433. called from an entry field, from either "When Field is
  434. Selected" or "When Field is Completed", AND you have named
  435. a "Return Field".
  436.  
  437. <Detailed explanation of Prompts: >
  438. <  Range Limit Field: >
  439. Range Limit Field:
  440. ──────────────────
  441.      The "Range Limit" field allows a subset of the data
  442.      file to displayed in the List box.  The subset of
  443.      records is based on the value contained in the "Range
  444.      Limit" field.  The "Range Limit" field is a component
  445.      of the "Access Key".
  446.  
  447.      If you place the "Range Limit" field on the screen as
  448.      an entry field, it allows the user to assign the KEY
  449.      field a value and "limit" the records displayed.  If
  450.      you don't place the "Range Limit" field on the screen
  451.      you will have to provide a value for the "Range Limit"
  452.      in an Embedded Source point such as "Setup Screen".
  453.  
  454.      You can also use both "Range Limit" and "Range Value"
  455.      fields.  The value in the "Range Value" field is
  456.      assigned to the "Range Limit" field when the Browse
  457.      is started.
  458.  
  459. <    Example using a Range Limit as an Entry field:>
  460.      Example using a Range Limit as an Entry field:
  461.      ──────────────────────────────────────────────
  462.      If you have two files; INVOICE and ITEMS, and you want
  463.      to Browse all ITEMS for a selected INVOICE, you can
  464.      "limit" the records shown in the Browse of the ITEMS
  465.      file.
  466.  
  467.      If the Browse "Access Key" for the ITEMS file looks
  468.      like this:
  469.  
  470.               ITM:InvoiceKey        !Key for ITEMS file
  471.                  ├─ ITM:InvoiceNo   !Invoice Number
  472.                  └─ ITM:Line        !Line number on Invoice
  473.  
  474.      To "Browse" the ITEMS for a single Invoice, select
  475.      ITM:InvoiceNo as the "Range Limit" field.  Now place
  476.      ITM:InvoiceNo as an Entry field on the Browse screen
  477.      before the List box.  When the Browse is executed the
  478.      user can enter an Invoice number, and after hitting
  479.      the TAB key, the List box will be filled with ITEMS
  480.      for the Invoice number the user entered.
  481.  
  482.      If the Browse "Access Key" is a multi-component KEY,
  483.      and you want to use the entire KEY to limit the
  484.      Browse, select the last component of the KEY as the
  485.      "Range Limit" field.
  486.  
  487.      If you place all the KEY fields on the screen as entry
  488.      fields, the Browse can be "limited" by the user at
  489.      runtime.  Alternatively, you can use the embedded
  490.      source code window "Setup Screen", to prime the KEY
  491.      components.
  492.  
  493. <    Example of Range Limit using Embedded Source:>
  494.      Example of Range Limit using Embedded Source:
  495.      ─────────────────────────────────────────────
  496.  
  497.      The INVOICE file has the following KEY:
  498.  
  499.               INV:InvoiceKey        !Key for INVOICES file
  500.                  ├─ INV:InvoiceNo   !Invoice Number
  501.                  └─ INV:Date        !Date of Invoice
  502.  
  503.      You can  use the Embedded Source window "Setup
  504.      Screen", to assign a value to the "Range Limit" field.
  505.  
  506.      Given the above KEY for the INVOICE file, you can
  507.      Browse the INVOICE file, and display only the INVOICES
  508.      that were entered for a specific date.
  509.  
  510.      To view all invoices for "today" in the embedded
  511.      source window "Setup Screen", you would enter:
  512.  
  513.      INV:Date = TODAY()
  514.  
  515. <  Range Value Field: >
  516. Range Value Field:
  517. ──────────────────
  518.      The "Range Value" field is used in conjunction with
  519.      the "Range Limit" field.   When a Browse is started,
  520.      the value in the "Range Value" field is assigned to
  521.      the "Range Limit" field. This "limits" the Browse
  522.      without having to place the "Range Limit" field on the
  523.      Browse screen.
  524.  
  525.      The "Range Value" field is typically assigned a value
  526.      by the procedure which calls the Browse.
  527.  
  528.      The "Range Value" field cannot be the same field as
  529.      the "Range Limit" field.
  530.  
  531. <    Example of a Range Value Field>
  532.      Example of a Range Value Field
  533.      ──────────────────────────────
  534.  
  535.      You want to let the user Browse the INVOICE file,
  536.      select an Invoice, and then Browse the ITEMS for the
  537.      selected Invoice.
  538.  
  539.      The Browse "Access Key" for the ITEMS file looks
  540.      like this:
  541.  
  542.               ITM:InvoiceKey        !Key for ITEMS file
  543.                  ├─ ITM:InvoiceNo   !Invoice Number
  544.                  └─ ITM:Line        !Line number on Invoice
  545.  
  546.  
  547.      The INVOICE file has the following KEY:
  548.  
  549.               INV:InvoiceKey        !Key for INVOICES file
  550.                  ├─ INV:InvoiceNo   !Invoice Number
  551.                  └─ INV:Date        !Date of Invoice
  552.  
  553.      Enter the "Range Limit" field as ITM:InvoiceNo, and
  554.      enter the "Range Value" field as INV:InvoiceNo.  The
  555.      Browse of the ITEMS file is "limited" to the value of
  556.      ITM:InvoiceNo, which receives its value from the
  557.      "Range Value" field; INV:InvoiceNo.
  558.  
  559.      The Browse of the INVOICE file is executed as a
  560.      "lookup" by entering the following code in the "Setup
  561.      Procedure" Embedded Source point:
  562.  
  563.      SETKEYCODE(ShftEnter)     ! call the Browse with the
  564.                                ! "Select" button active
  565.  
  566.      The Browse of the INVOICE file allows the user to
  567.      highlight an Invoice record, then hit the "Select"
  568.      button.  The "Select" button is used to call the
  569.      Browse of the ITEMS file.
  570.  
  571.      When the Browse for ITEMS is executed, INV:InvoiceNo is
  572.      assigned to ITM:InvoiceNo.  The List box is filled
  573.      with ITEMS for the INVOICE the user selected.
  574.  
  575. <  Record Filter: >
  576. Record Filter:
  577. ──────────────
  578.      You can display a subset of a data file using either
  579.      the "Range Limit" field, or a Record Filter.  If the
  580.      subset of the file is based on a field value which is
  581.      a component of the "Access Key" for the Browse, then
  582.      the "Range Limit" field will provide the fastest
  583.      performance. If the subset of the file is based on a
  584.      field which is not a component of the "Access Key" then
  585.      you will need to use a record filter.
  586.  
  587.      You can use BOTH a "Record Filter:" and a "Range
  588.      Limit" field.  This will give you the performance of a
  589.      "Range Limited" Browse, but allow you to display a
  590.      subset of those records.
  591.  
  592.      There are 2 methods you can use to enter a record
  593.      filter:
  594.  
  595.      Method #1.
  596.      You can use the Formula Generator to create a formula,
  597.      and enter a Formula Class of 'FILTER'.  The code
  598.      generated will "FILTER' the file based on your
  599.      formula.
  600.  
  601.      Method #2.
  602.      The "Record Filter:" entry field on the Browse
  603.      Procedure Properties dialog allows free-form
  604.      entering of a record filter expression. The code
  605.      entered here will not be validated before a compile.
  606.      Those who are not fully familiar with the Clarion
  607.      Language should use the Formula Generator instead of
  608.      this entry field.
  609.  
  610. <  Locator Field: >
  611. Locator Field:
  612.      A locator field is a screen entry field that updates a
  613.      component of the primary file access key. When a
  614.      locator field is entered, the closest matching record
  615.      is displayed in the list box.  The Locator field is
  616.      usually placed after the List box in the Field order
  617.      list, you can check this using Ctrl-F in the Screen
  618.      formatter.  Placing the Locator after the List box
  619.      allows the List box to be filled as soon as the Browse
  620.      is called, if the Locator is placed before the List
  621.      box the List will not be filled until the user TABS
  622.      off the List box.
  623.  
  624.      For example, scrolling a vendor file in vendor name
  625.      sequence uses a key that contains the vendor name field
  626.      (e.g. VND:Name).  To create a vendor name locator
  627.      field, place a VND:Name entry field on the screen
  628.      before or after the list box, and enter VND:Name for
  629.      the Locator Field on the Browse Property Screen.
  630.  
  631.      At runtime, when the user is scrolling the List box,
  632.      typing any character on the keyboard selects the
  633.      locator field, and allows entry for the match. Pressing
  634.      the Tab key positions the highlight bar to the closest
  635.      match.
  636.  
  637.      *If your Locator field is a Numeric field, you should
  638.      add the 'B'; to blank if zero, to the picture token.
  639.  
  640. <  Incremental Locator  >
  641. [√] Incremental Locator
  642.      Check this box to indicate that the Locator Field will act
  643.      function as an "Incremental Locator". You MUST place
  644.      the "Locator" field AFTER the List box in the Field
  645.      List, for the incremental search to work correctly.
  646.  
  647.      This template option allows one-half second delay for
  648.      the user to type a new letter into the locator field.
  649.      At each pause longer than one-half second, the Locator
  650.      contents are used to locate the closest match (the Tab
  651.      key does not need to be pressed). The backspace key is
  652.      active during this process, and reverses the search.
  653.  
  654.      *If your Locator field is a Numeric field, you should
  655.      add the 'B'; to blank if zero, to the picture token.
  656.  
  657. <  Update Procedure: >
  658. Update Procedure:
  659.      Enter the name of the update procedure to be used to
  660.      insert, change, or delete records.  If no update procedure
  661.      is entered, the "Insert", "Change", and "Delete"
  662.      pushbuttons should be removed from the screen layout.
  663.  
  664. <  Enable Hot Records: >
  665. [√] Enable Hot Records:
  666.      Fields from the file being scrolled can be placed
  667.      outside the List box.  The fields will display values
  668.      from the record that is highlighted in the List box,
  669.      and are updated whenever the highlight bar is moved.
  670.      Hot fields should be set as "Display only" when
  671.      placed on the screen.
  672.  
  673.      If "Enable Hot Records" is checked, every movement of
  674.      the highlight bar reads the record from the Primary
  675.      file into memory.  Next, lookups to the "ONE" side of
  676.      any Many:1 relations are performed. Any FORMULAs
  677.      which do not have a formula class set to
  678.      (FILTER,AVG,SUM or CNT) are then executed.  Finally,
  679.      any embeddded source code which was entered in the
  680.      'Process Selected Record' code window is executed.
  681.  
  682. <  Enable Total Embeds >
  683. [√] Enable Total Embeds
  684.      Check this box to generate total field code, without
  685.      the need for dummy formula fields. Otherwise, you must
  686.      define a total field with a formula class of SUM, CNT
  687.      or AVG.
  688.  
  689. <  Disable Memo Access >
  690.      If the file being "Browsed" has a Memo field you can
  691.      improve the performance of the Browse procedure by
  692.      turning off the reading of memo fields.
  693.  
  694. <  Locator fields >
  695. Locator fields
  696. ──────────────
  697. You can place an optional "Locator" field on the Screen
  698. that lets users find a specific record in the file.  If the
  699. user types any letter while scrolling the LIST box control
  700. goes to the Locator field.  The Locator field is completed
  701. with either the TAB key or a mouse CLICK outside the Locator
  702. field.  Once the "Locator" is completed the BROWSE procedure
  703. displays the closest matching record at the first row of the
  704. List box.
  705.  
  706. *If your Locator field is a Numeric field, you should add
  707. the 'B'; to blank if zero, to the picture token.
  708.  
  709. < Incremental Locator fields >
  710. Incremental Locator fields
  711. ──────────────────────────
  712. You can also define the "Locator" field as an "Incremental
  713. Locator".   An "Incremental Locator" doesn't wait for the
  714. TAB or a mouse click to start the search for a matching
  715. record, instead every half-second a search is made for the
  716. closest match to the contents of the Locator field. So if
  717. the user types "S" the first record with "S" is displayed
  718. on the first line of the List box.  If the user then types
  719. "M" a search is made for "SM" and the List box is scrolled
  720. to that record.  Typing a "Y" starts a search for "SMY", and
  721. so on.
  722.  
  723. Pressing the backspace key will reposition the highlight
  724. bar in reverse order.   For numeric data types, it is
  725. recommended to use a string picture type (for display
  726. purposes).  Date fields are not recommended for incremental
  727. locators.
  728.  
  729. *If your Locator field is a Numeric field, you should add
  730. the 'B'; to blank if zero, to the picture token.
  731.  
  732. <Totals Fields>
  733. <  Averages>
  734. <  Counts>
  735. <  Sums>
  736. <  Counts>
  737.      Use a Formula field with Formula Class of "SUM" to
  738.      apply the formula to every record in the Browse
  739.      session.
  740.  
  741.      A Computed Field with "AVG" in the Formula Class field
  742.      calculates the average for the records included in the
  743.      Browse session.
  744.  
  745.      A Computed Field with "CNT" in the Formula Class field
  746.      counts the records included in the Browse session.
  747.  
  748.      Totals that use a Conditional Formula are calculated
  749.      based on the Formula Condition.
  750.  
  751.      See the Topic "Formula Classes" for more details.
  752.  
  753. <  Recalculating Totals>
  754.   If you are using Embedded Source to calculate totals, you
  755.   can call the ROUTINE InitializeTotals, in the EMBED point
  756.   "After Update Procedure" to re-calculate your totals.
  757.   The ROUTINE InitializeTotals is generated if you have
  758.   checked "Enable Total Embeds", or you have a Formula
  759.   field with the CLASS of SUM, CNT, or AVG.
  760.  
  761.   For example:
  762.  
  763.   IF UpdateSuccessful = True     !if the file was updated
  764.     DO InitializeTotals          ! recalculate totals
  765.   END
  766.  
  767. <  Browsing Fields from related files >
  768. Browsing Fields from related files
  769. ──────────────────────────────────
  770. The Browse procedure will "lookup" fields in a file on the
  771. "One" side of a Many:1 relationship from the file being
  772. viewed in the List box.
  773.  
  774. For example, if you have two files, Customers and Orders.
  775. The relationship from Customers to Orders is 1:Many, one
  776. Customer may have many Orders. If you create a Browse to
  777. view the Orders file, you can place a field from the
  778. Customer file in the List box, and the Browse procedure will
  779. automatically do the "lookup" into the Customer file.
  780.  
  781. <  Default Pushbuttons Insert,Change,Delete,Select>
  782. Update Procedure, Default Pushbuttons
  783. ─────────────────────────────────────
  784. The "Insert", "Change", and "Delete" pushbuttons call an
  785. update procedure to process the highlighted record (update
  786. procedures are normally created with a "Form" or "MultiPage"
  787. template). The name of the procedure is entered as the
  788. "Update Procedure" on the Browse procedure property screen.
  789. If you do not name an "Update Procedure" these pushbuttons
  790. have no default action.
  791.  
  792. If all three pushbuttons are deleted and you have named an
  793. Update Procedure, the INSERT, ENTER and DELETE keys will
  794. still call the Update Procedure.  However, if you only
  795. remove one or two of these buttons (Insert, Change, or
  796. Delete) no Update Procedure will be called for the removed
  797. button(s).
  798.  
  799. The "Exit" pushbutton has an edit procedure defined as
  800. "RETURN", so when the user hits "Exit" the user is returned
  801. to the calling procedure.  You may remove the "Exit" button,
  802. but some other provision must be made to return from the
  803. procedure.
  804.  
  805. <  Select pushbutton>
  806. <  Calling a Browse to Lookup a value>
  807. The "Select" pushbutton is used when a Browse procedure is
  808. called as a "lookup".  The "Select" button is dimmed unless
  809. the Browse is called with KEYCODE() set to ShftEnter
  810. (Shift and Enter keys together).  If you won't be using the
  811. Browse procedure for lookups, you can delete this button.
  812.  
  813. When the user presses the "Select" button the record
  814. highlighted in the List box is loaded into memory, and the
  815. program returns to the calling procedure.
  816.  
  817. <  Runtime Browse Navigation keys >
  818. Runtime Browse Navigation keys
  819. ──────────────────────────────
  820. At runtime, when the List box is selected a highlight bar
  821. is always positioned over a single record in the List box.
  822. The Up and Down arrow keys move the highlight bar. Moving
  823. the highlight bar up off the top row or down off the bottom
  824. row scrolls a new record into the list box. The PGUP and
  825. PGDN keys scroll the prior and next page of records into the
  826. list box.   CTRL-PGUP displays the first page of records and
  827. CTRL-PGDN displays the last page of records.  Pressing the
  828. right mouse button in the top half of the List box scrolls
  829. up and in the bottom half scrolls down.
  830.  
  831.  
  832. <  Local Data >
  833. Local Data
  834. ──────────
  835. If you use the "Data" button on the procedure properties
  836. screen local data is generated before the screen structure.
  837.  
  838. If you use the Embedded source point "Data Section" the
  839. data is generated after the Screen structure.
  840.  
  841. <  Pulldown Menu >
  842. Pulldown Menu
  843. ─────────────
  844. If a pulldown structure has been created in the Pulldown
  845. Menu Formatter, it is generated after the screen structure.
  846. The template makes no provision for opening or closing a
  847. pulldown menu.  Such statements must be entered as embedded
  848. source.
  849.  
  850. <Formatter Support>
  851. Formatter Support
  852. ─────────────────
  853. The "Browse" procedure in CLARION.APP is pre-loaded with a
  854. screen layout containing a list box and pushbuttons named
  855. "Insert", "Change", "Delete", "Select", and "Exit". The
  856. field equate label of the list box MUST be "?List" and the
  857. "Immediate" attribute MUST be on turned on.  The horizontal
  858. scroll bar can be turned off if the required information
  859. fits in the list box. The vertical scroll bar is ignored by
  860. the template.  The list box may not have an edit procedure.
  861. All other properties of the list box can be changed.
  862.  
  863. The Report Formatter is not supported.
  864.  
  865. <Property Fields>
  866. Property Fields
  867. ───────────────
  868.  
  869. <Embedded Source>
  870. Embedded Source
  871.  
  872. <  Data Section>
  873. "Data Section"
  874.      In the data section of the procedure after local data, the
  875.      screen and pulldown structures. This may be used to
  876.      declare any data which you may want to use only in your
  877.      embedded source code.
  878.  
  879. <  Setup Procedure>
  880. "Setup Procedure"
  881.      After the CODE statement.
  882.  
  883. <  Setup Screen>
  884. "Setup Screen"
  885.      After OPEN(Screen) statement.
  886.  
  887. <  Setup Pulldown>
  888. "Setup Pulldown"
  889.      After OPEN(PullDown) statement.
  890.  
  891. <  Set to First Record Before Total Loop>
  892. "Set to First Record Before Total Loop"
  893.      After the SET(key,key) for Range limits before
  894.      beginning the total calculation LOOP.
  895.  
  896. <  Inside Total Loop, Immediately after NEXT>
  897. "Inside Total Loop, Immediately after NEXT"
  898.      Immediately after each record is read in the total
  899.      calculation LOOP.
  900.  
  901. <  Inside Total Loop after Filter>
  902. "Inside Total Loop after Filter"
  903.      After each record is read and filter conditions are
  904.      evaluated in the total calculation LOOP.
  905.  
  906. <  After Total Field Loop>
  907. "After Total Field Loop"
  908.      After all totals have been calculated.
  909.  
  910. <  LIST Class Formula>
  911. "LIST Class Formula"
  912.      After generation of LIST class formulas. This embedded
  913.      code window may be used instead of LIST class formulas.
  914.       This will allow setting up any fields which are
  915.      displayed within the scrolling listbox.
  916.  
  917. <  Case of No Records Found>
  918. "Case of No Records Found"
  919.      When no records are found to display.
  920.  
  921. <  After Filter and Range Check>
  922. "After Filter and Range Check"
  923.      After any record filter or Range limits are evaluated.
  924.  
  925. <  End of General Formulas>
  926. "End of General Formulas"
  927.      When processing a screen field, the formulas which do
  928.      not have a class of 'FILTER' or 'LIST' will be
  929.      generated.  This embedded source window allows the
  930.      entry of computations for screen display fields without
  931.      the use of the Formula Formatter.
  932.  
  933. <  Set to First Record>
  934. "Set to First Record"
  935.      When using Range Limits, a SET statement is issued to
  936.      locate the first record. This embedded source code
  937.      window appears just after the generated SET statement
  938.      and allows you to override the SET.
  939.  
  940. <  Set to Last Record>
  941. "Set to Last Record"
  942.      When using Range Limits, a SET statement is used to
  943.      locate the closest match to the last record.  This
  944.      embedded source code window appears just after the SET
  945.      and allows you to override the SET.
  946.  
  947. <  Process Selected Record>
  948. "Process Selected Record"
  949.      When Enable Hot Records has been checked, code within
  950.      this embedded source window is executed upon any
  951.      movement of the list box highlight bar. The highlighted
  952.      record is retrieved into memory, any Many to One
  953.      secondary file records are retrieved, and any general
  954.      formulas are computed just prior to this embedded
  955.      source code.
  956.  
  957. <  End of Procedure>
  958. "End of Procedure"
  959.      Code placed in this window executes after all other
  960.      code in the procedure has executed. This code begins in
  961.      column one, therefore you may use this window to write
  962.      any ROUTINEs which are called from any other embedded
  963.      source code window.
  964.  
  965. <  Prior to Update Procedure>
  966. "Prior to Update Procedure"
  967.      Immediately before the Update Procedure is called.
  968.  
  969. <  After Update Procedure>
  970. "After Update Procedure"
  971.      Immediately after return from the Update Procedure.
  972.  
  973. <  When Screen Field is Selected : >
  974. "When Screen Field is Selected : "
  975.      In the CASE SELECTED() structure, executed when the
  976.      field is selected for entry.
  977.  
  978. <  When Screen Field is Completed: >
  979. "When Screen Field is Completed: "
  980.      In the CASE FIELD() structure, executed when the field has
  981.      been completed.
  982.  
  983. <Formula Classes>
  984. Formula Classes
  985.  
  986. <  FILTER >
  987. FILTER
  988.      A Conditional Field with "FILTER" in the Formula Class field
  989.      is used to display a subset of the datafile. If the
  990.      "IF Condition" expression evaluates to false for a
  991.      given record, it is not displayed.
  992.  
  993.      Enter the expression for the "IF Condition" field and
  994.      leave the "True Formula" and "False Formula" fields
  995.      blank. Only the Expression will be used for the filter.
  996.  
  997.      A filter expression can alternatively be entered in
  998.      the Browse Procedure Property entry field "Record
  999.      Filter: ", instead of using the formula generator.
  1000.  
  1001. <  LIST >
  1002. LIST
  1003.      A Conditional or Computed Field with "LIST" in the
  1004.      Formula Class field is used for those values which will
  1005.      be displayed in the list box and are only evaluated
  1006.      when the list box item is created.
  1007.  
  1008. <  SUM >
  1009. SUM
  1010.      A Computed Field with "SUM" in the Formula Class field
  1011.      calculates the "Formula Field" using the "Formula
  1012.      Expression".
  1013.  
  1014.      The code is generated as:
  1015.  
  1016.      FormulaFieldName$ += FormulaExpression
  1017.  
  1018.      A Conditional Field with "SUM" in the Formula Class
  1019.      field conditionally calculates the "Formula Field"
  1020.      using the "Formula Expression" contained in the fields
  1021.      named in the True and False Expressions.
  1022.  
  1023.      The code is generated as:
  1024.  
  1025.      IF CONDITION
  1026.        FormulaFieldName$ += the TRUE FormulaExpression
  1027.      ELSE
  1028.        FormulaFieldName$ += the FALSE FormulaExpression
  1029.      END
  1030.  
  1031. <  AVG >
  1032. AVG
  1033.      A Computed Field with "AVG" in the Formula Class
  1034.      field calculates an Average of the field named in the
  1035.      Expression. The total value is calculated, then
  1036.      divided by the number of records read to achieve that
  1037.      total.
  1038.  
  1039. <  CNT >
  1040. CNT
  1041.      A Computed Field with "CNT" in the Formula Class field
  1042.      counts the number of records included in the Browse
  1043.      session.
  1044.  
  1045. <  No class (blank) >
  1046. No class (blank)
  1047.      Calculates the formula every time any field on the
  1048.      screen is completed.  The calculation code is generated
  1049.      before the field edit routines at the top of the field
  1050.      processing code.
  1051.  
  1052. <<The Child Template>>
  1053. <General Information>
  1054.  
  1055. The "Child" template creates a procedure which has a screen with
  1056. features from both the Browse and Form templates. This
  1057. template screen has both a scrolling area and a record
  1058. update area.
  1059.  
  1060. This template is designed to process a batch of child
  1061. records as a single transaction. This batch of records
  1062. must be in a file which is the child file in a parent-child
  1063. relationship (the many side of a one-to-many relationship).
  1064. When a Child Procedure is called, all of the related
  1065. children records for the valid parent record in memory will
  1066. be loaded into a memory QUEUE (the parent record must
  1067. reside on disk as well as in memory).  The QUEUE may be
  1068. modified by adding, changing, or deleting records.  Upon
  1069. completion of the OK button, the QUEUE records are written
  1070. back to disk as a single transaction.  Changes to the QUEUE
  1071. are discarded if the Exit button is selected.
  1072.  
  1073. In order to maintain the highest level of data integrity,
  1074. the update of the child file is framed within a Transaction
  1075. process. (See the essay on Transaction Processing in the
  1076. Programmer's Guide for details.)
  1077.  
  1078. The Btrieve and Clarion file drivers support Transaction
  1079. Processing. So, the Child file must utilize one of these
  1080. file drivers in order to work properly.  For drivers which
  1081. do not support transaction processing, a Browse-Form
  1082. template combination may be used.
  1083.  
  1084. The correct File Schematic is essential to the proper
  1085. operation of a Child template procedure.  By selecting the
  1086. Files... button from the Procedure Properties screen you
  1087. may view the existing file schematic, or create a new file
  1088. schematic if one has not already been defined.
  1089.  
  1090. The child file must be the first (primary) file in the
  1091. File Schematic. The parent file must be listed below the
  1092. child file, and must have a relationship defined with the
  1093. child file as in the example below:
  1094.  
  1095.      This File Schematic is supported:
  1096.      ---------------------------------
  1097.          Primary (Child file)
  1098.            └──> Secondary (Parent file for Child)
  1099.  
  1100.      This File Schematic is NOT supported:
  1101.      -------------------------------------
  1102.          Primary (Parent file)
  1103.            └─>> Secondary (Child file of Parent)
  1104.  
  1105. The following is a check-list to help in creating a Child
  1106. template procedure for the first time:
  1107.  
  1108.      - Create the File schematic as shown above (Child file first,
  1109.      then Parent file). Select an Access key from the Child
  1110.      file to be used for the listbox order.
  1111.  
  1112.      - In the Screen Formatter, place Scrolling fields from the
  1113.      child file in the list box, and Child file Entry
  1114.      fields in the area above the Save and Exit buttons.
  1115.  
  1116.      - Re-order the fields on the screen so that the entry
  1117.        area fields are consecutive. Remember which field is
  1118.        your first update field. Save the screen structure.
  1119.  
  1120.      - Fill out the First Update Field and Parent File Procedure
  1121.        Property fields. These fields are required.
  1122.  
  1123. <Formatter Support>
  1124. Formatter Support
  1125.  
  1126. The Child template's default screen is pre-defined with
  1127. two logically separate areas, a scrolling area and a field
  1128. entry area.  The scrolling area lists all children records
  1129. for the selected parent.  The standard list box keys are
  1130. available to scroll through the child records.  (See the
  1131. Browse template's help for details.)
  1132.  
  1133. Buttons below the list box allow the user to Insert, Change
  1134. or Delete records. Also, an OK and Cancel button are
  1135. active while in the scrolling portion of the screen.
  1136.  
  1137. The field entry area is similar to a Form in operation.
  1138. Entry fields are placed in this area to allow data entry
  1139. for a child record.  The fields in this area must be
  1140. consecutive in the screen structure and must immediately
  1141. precede the Save and Exit buttons as a block of fields is
  1142. selectively ENABLE()'d and DISABLE()'d when moving back and
  1143. forth between the scrolling area and the update area.  The
  1144. record may be saved to the list box using the Save button,
  1145. or it may be erased by using the Exit button.  The OK and
  1146. Cancel buttons are only available while in the scrolling
  1147. area.
  1148.  
  1149. Once the OK button is completed, the entries in the QUEUE
  1150. are written to disk within a transaction.  If any error
  1151. occurs, the entire set of records are rolled back to the
  1152. status of the file before the OK button was completed and
  1153. the user is given an opportunity to change any problem
  1154. records and attempt a save again.
  1155.  
  1156. If a Pulldown structure has been created by the Pulldown
  1157. Menu Formatter, it is generated after the screen structure.
  1158. The Pulldown is OPENed after the screen structure, and is
  1159. closed upon exit from the procedure.
  1160.  
  1161. The Report Formatter is not supported.
  1162.  
  1163. <Property Fields>
  1164. Property Fields:
  1165.  
  1166. <  First Update Field>
  1167. First Update Field:
  1168.      The Child template has 2 separate modes of operation.  The
  1169.      template selectively disables fields which are not
  1170.      appropriate to the current mode.
  1171.  
  1172.      Scrolling Area - Only scrolling area field are
  1173.      available. Field Entry Area - Only entry specific
  1174.      fields are available.
  1175.  
  1176.      You MUST enter the First Update Field here. This
  1177.      should be the first entry field for the Child file.
  1178.      This is necessary to properly ENABLE() the range of
  1179.      fields in the screen structure from this field to the
  1180.      Exit pushbutton.  If the fields are not consecutive in
  1181.      the Field List, the proper fields may not be ENABLEd
  1182.      or DISABLEd.  The easiest way to insure consecutive
  1183.      entry fields is to Auto Re-order the screen fields
  1184.      just prior to saving the screen.
  1185.  
  1186. <  Parent File: >
  1187. Parent File:
  1188.      The Parent File MUST be supplied to identify which
  1189.      Parent file to use for the relationship.  The Child
  1190.      template is designed to handle the relationship
  1191.      between 1 Parent and 1 Child file.
  1192.  
  1193.      In order to insure that only 1 user in a multi-user
  1194.      environment may modify a batch of child records at a
  1195.      time, a HOLD is placed on the parent record. This
  1196.      will signal to other Child procedures that the
  1197.      children for this parent are currently being modified.
  1198.      Other procedures will be able to read the parent
  1199.      record, but will not be able to modify it. Therefore,
  1200.      it is important that when using a Child template
  1201.      procedure to modify a file's records, that there are
  1202.      no other procedures which may modify these child
  1203.      records. (Example: There must not be any Form template
  1204.      procedures which may modify a child file's record
  1205.      while it is being updated via a Child template.)
  1206.  
  1207. <  Exit on Null Parent:>
  1208. Exit on Null Parent:
  1209.      Since the parent record information is critical to
  1210.      finding the correct children for a parent, you may
  1211.      select to RETURN from the child procedure when no
  1212.      parent record has been selected. You may enter
  1213.      embedded source code to select a parent record and
  1214.      leave this checkbox blank.
  1215.  
  1216. <  Update Parent on OK:>
  1217. Update Parent on OK:
  1218.      With this checkbox enabled, the parent record is PUT
  1219.      back to its file upon completion of the OK button.
  1220.      This allows updating of any parent information which
  1221.      may have been changed while in the Child procedure.
  1222.  
  1223. <Embedded Source>
  1224. Embedded Source
  1225.  
  1226. <  Data Section>
  1227. "Data Section"
  1228.      In the data section of the procedure after local data,
  1229.      the screen and pulldown structures.  This may be used
  1230.      to declare any data which you may want to use only in
  1231.      your embedded source code.
  1232.  
  1233. <  Setup Procedure>
  1234. "Setup Procedure"
  1235.      After the CODE statement.
  1236.  
  1237. <  Setup Screen>
  1238. "Setup Screen"
  1239.      After OPEN(Screen).
  1240.  
  1241. <  Top of ACCEPT Loop>
  1242. "Top of ACCEPT Loop"
  1243.      After LOOP statement and prior to generating formula
  1244.      fields.
  1245.  
  1246. <  Prior to Return>
  1247. "Prior to Return"
  1248.      After exiting the main loop, but prior to freeing the
  1249.      Queue. This would be a good place to add code which
  1250.      needs to loop through the RecordQueue for information
  1251.      before exiting.
  1252.  
  1253. <  End of Procedure>
  1254. "End of Procedure"
  1255.      Code placed in this window executes after all other
  1256.      code in the procedure has executed.  This code begins
  1257.      in column one, therefore you may use this window to
  1258.      write any ROUTINEs which are called from any other
  1259.      embedded source code window.
  1260.  
  1261. <  Enter Scroll Mode Routine>
  1262. "Enter Scroll Mode Routine"
  1263.      After the DISABLE and ENABLE of the fields to switch
  1264.      to the scrolling area from the entry field area.  This
  1265.      is a good place to override the automatic enabling and
  1266.      disabling of fields.
  1267.  
  1268. <  Enter Update Mode Routine>
  1269. "Enter Update Mode Routine"
  1270.      Also a good place to override the automatic enabling
  1271.      and disabling of fields, but when going to update
  1272.      mode.
  1273.  
  1274. <  When Screen Field is Selected : >
  1275. "When Screen Field is Selected : "
  1276.      In the CASE SELECTED() structure, executed when the
  1277.      field is selected for entry.
  1278.  
  1279. <  When Screen Field is Completed: >
  1280. "When Screen Field is Completed: "
  1281.      In the CASE FIELD() structure, executed when the field has
  1282.      been completed.
  1283.  
  1284.  
  1285. <<The External Template>>
  1286. <General Information>
  1287.  
  1288. The "External" template notifies the Application Generator
  1289. that the procedure is contained in an external source,
  1290. object, or Library file. No source code is generated for
  1291. an "External" procedure.  The procedure's prototype is
  1292. placed in the program's MAP from the MODULE Structure
  1293. Include File named on the Module Properties window.
  1294.  
  1295. The Module Name field must contain the filename of an
  1296. external source, object or library file.
  1297.  
  1298.  
  1299. <<The File Template>>
  1300. <General Information>
  1301.  
  1302. The File template produces a procedure which will allow the
  1303. user to Pick a DOS filename from a listing of files on the
  1304. currently logged disk.
  1305.  
  1306. The user may use the keyboard or the mouse to change
  1307. directories or select the file.  Since the file mask is an
  1308. Entry field, the file mask may be changed by the user.
  1309.  
  1310. A mouse double-click on button 1 (The left button on a
  1311. right handed mouse) will change directory if the directory
  1312. list box is selected, or will select the highlighted file
  1313. if in the files list box.
  1314.  
  1315. <Formatter Support>
  1316. Formatter Support
  1317.  
  1318. The "File" procedure in CLARION.APP is pre-loaded with a
  1319. screen layout containing 2 listboxes, 1 file mask entry
  1320. field, 1 directory name display field, and 2 pushbuttons
  1321. named "OK" and "Cancel".
  1322.  
  1323. The files listbox shows filenames in the selected directory
  1324. which match the file mask. The directories listbox displays
  1325. any subdirectories in the current directory and the parent
  1326. directory denoted by '..' when available.  The file mask
  1327. entry field is large enough to contain a simple file mask of
  1328. '*.???' and will cause the files list box to be rebuilt when
  1329. changed. The directory display field will display the
  1330. current directory up to 35 characters. The OK pushbutton
  1331. will write the selected filename to the specified Filename
  1332. Variable and Cancel pushbutton will return to the calling
  1333. procedure leaving the Filename Variable with its original
  1334. contents.
  1335.  
  1336. <Property Fields>
  1337. Property Fields
  1338.  
  1339. <  Filename Variable:>
  1340. Filename Variable:
  1341.      The filename may be saved in any string variable. (It
  1342.      is suggested to use STRING(64) since the path will be
  1343.      added. DOS allows a 64 character filename.) However,
  1344.      a default variable has been added to the global data
  1345.      of the Default Application file (GLO:Filespec in
  1346.      CLARION.APP) and it will hold the filename if the
  1347.      Filename Variable is blank.
  1348.  
  1349. <  Initial Directory:>
  1350. Initial Directory:
  1351.      Optionally, an initial directory may be specified for
  1352.      the opening directory listing (like REPORTS).  The File
  1353.      template will call SETPATH() just prior to filling the
  1354.      list box. Another SETPATH() will return to the original
  1355.      path before returning from this procedure.
  1356.  
  1357. <  Beginning file mask:>
  1358. Beginning file mask:
  1359.  
  1360.      A beginning file mask may also be entered to use for
  1361.      the opening file list. The files will be sorted within
  1362.      the mask. If no match for the file mask is found, the
  1363.      text 'NO MATCH' will appear in the file list box.  If
  1364.      no Beginning File Mask is entered the default file mask
  1365.      '*.*' will be used.
  1366.  
  1367. <  Next Procedure:>
  1368. Next Procedure:
  1369.      Enter the name of a procedure to be called once a
  1370.      filename has been successfully selected. The Filename
  1371.      Variable will be assigned the selected filename and the
  1372.      Next Procedure will be called.
  1373.  
  1374.      The View template was designed in conjunction with the
  1375.      File template and may be used to view the selected
  1376.      file.  Enter the name of a procedure created with the
  1377.      View template as the Next Procedure for this
  1378.      combination.
  1379.  
  1380. <  Reselect Upon Return:>
  1381. Reselect Upon Return:
  1382.      If a Next Procedure is defined, an option is provided
  1383.      to have one of the following occur:
  1384.  
  1385.      1) Return to the calling procedure after a return from the
  1386.       update procedure. (the default)
  1387.  
  1388.      2) Allow the user to reselect another filename after a
  1389.      return from the update procedure. (When the checkbox is
  1390.      checked.)
  1391.  
  1392. <  Blank Name On Cancel:>
  1393. Blank Name On Cancel:
  1394.      If checked, the variable you named as the Filename
  1395.      Variable (above) will be blanked when the user selects
  1396.      the Cancel button.  When no Filename Variable is
  1397.      specified, GLO:FileSpec (the default filename variable)
  1398.      is blanked.
  1399.  
  1400.      This option is useful when using a File template
  1401.      without a Next Procedure.  In this case, it is possible
  1402.      to detect if the user has not selected a file by
  1403.      checking the value contained in the Filename Variable
  1404.      (or GLO:FileSpec).
  1405.  
  1406. <  Allow Drive Searches:>
  1407. Allow Drive Searches:
  1408.      If checked, the list of directories will also contain
  1409.      all the current DOS drive letters.  This allows the
  1410.      user to search for the file on any valid drive.
  1411.  
  1412. <Embedded Source>
  1413. Embedded Source
  1414.  
  1415. <  Data Section >
  1416. "Data Section"
  1417.      In the data section of the procedure before local
  1418.      data, the screen and pulldown structures.  This may be
  1419.      used to declare any data which you may want to use only
  1420.      in your embedded source code.
  1421.  
  1422. <  Setup Procedure >
  1423. "Setup Procedure"
  1424.      After the CODE statement.
  1425.  
  1426. <  Setup Screen>
  1427. "Setup Screen"
  1428.       After the OPEN(Screen) statement.
  1429.  
  1430. <  Top of Accept Loop>
  1431. "Top of Accept Loop"
  1432.       At the top of the screen field processing loop.
  1433.  
  1434. <  End of Procedure>
  1435. "End of Procedure"
  1436.      Code placed in this window executes after all other
  1437.      code in the procedure has executed.  This code begins
  1438.      in column one, therefore you may use this window to
  1439.      write any ROUTINEs which are called from any other
  1440.      embedded source code window.
  1441.  
  1442. <  When Screen Field is Selected : >
  1443. "When Screen Field is Selected : "
  1444.      In the CASE SELECTED() structure, executed when the
  1445.      field is selected for entry.
  1446.  
  1447. <  When Screen Field is Completed: >
  1448. "When Screen Field is Completed: "
  1449.      In the CASE FIELD() structure, executed when the field
  1450.      has been completed.
  1451.  
  1452. <Formula Classes>
  1453. Formula Classes
  1454.  
  1455. No formula classes are supported by this procedure
  1456. Template. Formula fields are not supported.
  1457.  
  1458.  
  1459. <<The Form Template>>
  1460. <General Information>
  1461.  
  1462. The "Form" template generates a procedure that will ADD,
  1463. CHANGE or DELETE a record from the procedure's Primary file
  1464. (as defined in the File Schematic).
  1465.  
  1466. If the Global Application prompt, "Enable Shared Files: "
  1467. is checked ON, the code is generated with complete Record
  1468. level locking for a multi-user application.
  1469.  
  1470. Referential Integrity constraints, as defined in the Data
  1471. Dictionary, are enforced during any update to the Primary
  1472. file, for ALL 1:MANY relationships to the Primary file.
  1473.  
  1474. The template allows for multiple auto-increment key fields
  1475. and concurrency checks of multiple memo fields.
  1476.  
  1477. <Data Dictionary Validity Checks>
  1478. <Initial field values>
  1479. <Range checking>
  1480. "Initial values" defined in the Data Dictionary are
  1481. pre-loaded during an ADD.
  1482.  
  1483. "Range checks" are generated from the Data Dictionary
  1484. definitions and are enforced during an ADD or CHANGE. If an
  1485. out of range condition exists, the user is notified
  1486. (using the ShowWarning procedure) of the valid range for
  1487. the field, and the cursor is placed on that field for
  1488. editing.
  1489.  
  1490. <Displaying fields from Related Files>
  1491. The template automatically generates GET statements to
  1492. access any secondary files where the relationship from
  1493. the procedures Primary file is defined as MANY:1.  Fields
  1494. from the "1" side of the relationship should be placed on
  1495. the Screen as "display-only".  No code is generated to
  1496. update files on the "1" side of the relationship.
  1497.  
  1498. Example:
  1499.   In the Data Dictionary you have defined CUSTOMERS and
  1500.   INVOICES as a 1:MANY relationship; "1" customer may
  1501.   have MANY invoices. That means the INVOICES file is
  1502.   related MANY:1 to the CUSTOMERS file.
  1503.  
  1504.   On the FORM used to update the INVOICES file you can place
  1505.   the CUSTOMERS name and address fields on the Screen, and
  1506.   the correct CUSTOMERS record will be retrieved from the
  1507.   file. But even if you allowed changes to the CUSTOMERS
  1508.   name and address fields, there would not be any code
  1509.   generated to update the CUSTOMERS record.
  1510.  
  1511. <Data Dictionary Validity>
  1512. <  Must be in File>
  1513. <  Automatic field validation>
  1514. The "Must be in File" validity check defined in the Data
  1515. Dictionary is enforced when the field is "completed", or
  1516. when the user presses the "OK" button.
  1517.  
  1518. <  Lookups>
  1519. Enter the name of a BROWSE procedure in the "When Field is
  1520. Selected Procedure:" entry, if you want a Browse "lookup"
  1521. to appear as soon as the field is selected by the user.
  1522.  
  1523. Use the "When Field is Completed Procedure:"  if you
  1524. want to  "validate" an entry after the user completes
  1525. the field.
  1526.  
  1527. <  Multiuser File Updates>
  1528. If the application is set to SHARE files, the procedure
  1529. enforces multi-user concurrency checking at the record
  1530. level.  If a conflict arises from two or more workstations
  1531. attempting to update the same record, the Record is re-read
  1532. from disk and the FORM screen is refreshed.  The user is
  1533. notified of the change, and placed back in edit mode.
  1534.  
  1535. <  Referential Integrity>
  1536. If Relational Constraints have been defined in the Data
  1537. Dictionary, code is generated to enforce the Constraint on
  1538. 1:MANY relationships.  All Referential Integrity Constraints are
  1539. enforced from the Primary file for the procedure, down its
  1540. Relational File Tree for as many levels as exist.
  1541.  
  1542. <  Transaction Framing >
  1543. During a relational Change or Delete a HOLD is placed on
  1544. the Primary file record.  All child files of the Primary
  1545. file are updated within a transaction frame to ensure an
  1546. 'all or nothing' update or delete.  If LOGOUT cannot be
  1547. initiated, the user is given a chance to retry the update or
  1548. delete.
  1549.  
  1550. <  No Transaction Framing >
  1551. Not all file drivers support transaction processing.  If
  1552. you are using a File driver that does not support
  1553. transaction processing, or using multiple file
  1554. drivers within a relationship, you will receive a Warning
  1555. during code generation:
  1556.  
  1557.   "PRIMARY file driver does not support LOGOUT()"
  1558.  
  1559. If the file driver does not support the LOGOUT statement,
  1560. code is generated to update the files without the benefit of
  1561. a transaction frame.
  1562.  
  1563. Also, if the files in the Relationship use multiple file
  1564. drivers, the referential update/delete cannot use the LOGOUT
  1565. statement.
  1566.  
  1567. For example, if a file relationship is defined with one file
  1568. using the Btrieve driver and the related file using the
  1569. Clarion driver, code is generated without a LOGOUT
  1570. transaction frame.  Either situation has the potential to
  1571. compromise the referential integrity of your database.  If
  1572. the update/delete fails for any reason, your files cannot be
  1573. restored to their original state.
  1574.  
  1575. Finally, if you have set up multiple relations between the
  1576. same two files, transaction framing cannot process these
  1577. relations.  This will be evident at run-time as a Clarion
  1578. Run-Time error, Cannot Logout Files.  In this case, check
  1579. the Disable RI Logout Check-box on the Procedures Property
  1580. screen.
  1581.  
  1582. <Formatter Support>
  1583. Formatter Support
  1584.  
  1585. The default screen contained in CLARION.APP has a local
  1586. variable named LOC:Message placed at the top of the entry
  1587. screen. This variable is used to inform the user of the
  1588. current action: Add, Change, or Delete of the record on the
  1589. screen.  The message displayed is stored in CLARION.APP in
  1590. the global variables as GLO:InsertMsg, GLO:ChangeMsg, and
  1591. GLO:DeleteMsg.
  1592.  
  1593. You can enter your own messages on the Procedure
  1594. Properties window. If any Prompt for a message is filled in,
  1595. it will be used instead of the global values stored in the
  1596. default .APP file.
  1597.  
  1598. The default screen has two buttons: Ok and Cancel.  Both of
  1599. these fields are required by the template.
  1600.  
  1601. If a Pulldown structure has been created by the Pulldown
  1602. Menu Formatter, it is generated after the screen structure.
  1603. The Pulldown is OPENed after the screen structure, and is
  1604. closed upon exit from the procedure.
  1605.  
  1606. The Report Formatter is not supported.
  1607.  
  1608. <Property Fields>
  1609. Property Fields
  1610.  
  1611. <  Insert Message>
  1612. Insert Message
  1613.      Enter a message to use instead of the default stored
  1614.      in Clarion.app for Inserting a record.
  1615.  
  1616. <  Change Message>
  1617. Change Message
  1618.      Enter a message to use instead of the default stored
  1619.      in Clarion.app for Changing a record.
  1620.  
  1621. <  Delete Message>
  1622. Delete Message
  1623.      Enter a message to use instead of the default stored
  1624.      in Clarion.app for Deleting a record.
  1625.  
  1626. <  Action after ADD>
  1627. Action after ADD
  1628.      The template supports multiple adds without leaving
  1629.      the FORM screen.  There are four possible actions after
  1630.      an ADD:
  1631.  
  1632.      'Return to caller ' generates code to return to the
  1633.      calling procedure after the record is added.
  1634.  
  1635.      'Retain Record ' generates code to allow continuous
  1636.      ADDs without clearing the record buffer or the screen.
  1637.      When the user selects the 'Ok' button the record
  1638.      buffer's contents are ADDed to the file and the user is
  1639.      placed back on the first entry field on the screen. If
  1640.      there are Auto-increment keys defined for the file,
  1641.      the record is saved, the next Autonumber is retrieved,
  1642.      then the record is restored.
  1643.  
  1644.      'Clear Record ' generates code to allow continuous
  1645.      ADDs but clears the record buffer and screen between
  1646.      each ADD.  When the user selects the Ok button the
  1647.      screen and record buffer are cleared and the user is
  1648.      placed back on the first entry field on the screen. If
  1649.      there are Auto-increment keys defined for the file,
  1650.      the next Autonumber is retrieved and the screen
  1651.      updated.
  1652.  
  1653. <  Copy field hotkey:>
  1654. Copy field hotkey:
  1655.      This prompt is dependent on the 'Retain_Record'
  1656.      button. If 'Retain Record' is selected, AND the 'Copy
  1657.      field hotkey' contains a hotkey value, the template
  1658.      generates code for repeated ADDs that allows the user
  1659.      to duplicate individual fields from the prior record
  1660.      only when the hotkey is pressed.
  1661.  
  1662.      When the user presses the Ok button, the screen fields
  1663.      are erased and the cursor is placed back on the first
  1664.      field.  If the user presses the defined hotkey the
  1665.      contents of the currently highlighted field are copied
  1666.      from the last record the user added.
  1667.  
  1668. <  Next Procedure>
  1669. Next Procedure
  1670.      Enter the Procedure to call when the Ok button is
  1671.      pressed, AFTER the file's update has completed without
  1672.      any errors. The Next Procedure call is generated before
  1673.      the code for any Repeated ADDs.
  1674.  
  1675. <  Disable RI Logout>
  1676. Disable RI Logout
  1677.      If multiple CONSTRAINED relations exist between any
  1678.      two files processed by the Referential Integrity code,
  1679.      when this code is processed your program will
  1680.      experience a Clarion Run-Time halt, Cannot Logout
  1681.      Files.  Check the Disable RI Logout Check-Box to
  1682.      stop the RI code from generating.  NOTE:  ANY RI
  1683.      TRANSACTIONS will not be recoverable if an error
  1684.      occurs.
  1685.  
  1686. <Embedded Source>
  1687. Embedded Source
  1688.  
  1689. <  Data Section >
  1690. "Data Section"
  1691.      In the data section of the procedure after local data,
  1692.      the screen and pulldown structures. This may be used to
  1693.      declare any data which you may want to use only in your
  1694.      embedded source code.
  1695.  
  1696. <  Setup Procedure >
  1697. "Setup Procedure"
  1698.      Source code is inserted after the CODE statement.
  1699.  
  1700. <  On Add After Record Buffer Is Cleared >
  1701. "On Add After Record Buffer Is Cleared"
  1702.      Immediately after the record buffer is cleared for an
  1703.      AddRecord and just before auto-incrementing fields are
  1704.      incremented or fields with initial values are
  1705.      initialized.
  1706.  
  1707. <  Setup Screen >
  1708. "Setup Screen"
  1709.      After OPEN(Screen).
  1710.  
  1711. <  Before File I/O >
  1712. "Before File I/O"
  1713.      Immediately before the record is written to disk (ADD, PUT,
  1714.      or DELETE).
  1715.  
  1716. <  Setup Next Procedure >
  1717. "Setup Next Procedure"
  1718.      If a 'Next Procedure' was defined, code is inserted
  1719.      before the procedure is called.
  1720.  
  1721. <  Return from Next Procedure >
  1722. "Return from Next Procedure"
  1723.      If a 'Next Procedure' was defined, code is inserted
  1724.      after the procedure is executed.
  1725.  
  1726. <  After ADD on Retain or ClearRecord >
  1727. "After ADD on Retain or ClearRecord"
  1728.      After a record has been added and just before going on
  1729.      to add another record in "recursive add mode."
  1730.  
  1731. <  End of Procedure >
  1732. "End of Procedure"
  1733.      Code placed in this window executes after all other
  1734.      code in the procedure has executed. This code begins in
  1735.      column one, therefore you may use this window to write
  1736.      any ROUTINEs which are called from any other embedded
  1737.      source code window.
  1738.  
  1739. <  When Screen Field is Selected : >
  1740. "When Screen Field is Selected : "
  1741.      In the CASE SELECTED() structure, executed when the
  1742.      field is selected for entry.
  1743.  
  1744. <  When Screen Field is Completed: >
  1745. "When Screen Field is Completed: "
  1746.      In the CASE FIELD() structure, executed when the field
  1747.      has been completed.
  1748.  
  1749. <Formula Classes>
  1750.  Formula Classes
  1751.  
  1752. <  SETUP >
  1753. SETUP
  1754.      A Conditional or Computed Field with "SETUP" in the
  1755.      Formula Class field is calculated once at the beginning
  1756.      of the procedure before the screen field processing
  1757.      LOOP.
  1758.  
  1759. <  RETURN >
  1760. RETURN
  1761.      A Conditional or Computed Field with "RETURN" in the
  1762.      Formula Class field is calculated once just before the
  1763.      return from the procedure when the user selects the
  1764.      'Ok' button.
  1765.  
  1766. <  PRIMEKEY >
  1767. PRIMEKEY
  1768.      A Conditional or Computed Field with "PRIMEKEY" in the
  1769.      Formula Class field is calculated just before the
  1770.      SET(Key,Key) during an Autoincrement ADD. It is
  1771.      inserted again right before the ADD(File) to preserve
  1772.      any components you have primed.
  1773.  
  1774.      This can be used to prime key components to enable
  1775.      subset numbering. For example, it can be used to cause
  1776.      autonumbering of line item numbers on an invoice.  If
  1777.      you have defined a key with the fields InvoiceNumber
  1778.      and LineItemNo, supply the current InvoiceNumber as a
  1779.      PRIMEKEY Formula.  The AutoNumber Routine determines
  1780.      the next available LineItemNo for that invoice.  The
  1781.      record ADDed to the file will already have
  1782.      InvoiceNumber and LineItemNo in the record buffer and
  1783.      on disk.
  1784.  
  1785. <  No class (blank) >
  1786. No class (blank)
  1787.      Calculates the formula every time any field on the
  1788.      screen is completed.  The calculation code is generated
  1789.      before the field setup routines at the top of the
  1790.      processing LOOP.
  1791.  
  1792.  
  1793. <<The Form21 Template>>
  1794. <General Information>
  1795.  
  1796. The "Form21" template generates a procedure that will ADD,
  1797. CHANGE or DELETE a record from the procedure's Primary file (as
  1798. defined in the File Schematic). This form works similarly
  1799. to the (non-CUA) version 2.1 form (the same keystrokes are
  1800. available to navigate and complete the form, as well as
  1801. version 3.0 button support).  Keystrokes supported:
  1802.  
  1803.   CtrlEsc ----------- Cancel
  1804.   CtrlEnter --------- Done
  1805.   Enter ------------- Field complete or Done (on last field)
  1806.   Esc --------------- Field return or Cancel (on first field)
  1807.  
  1808. The template allows for multiple auto-increment key fields
  1809. and concurrency checks of multiple memo fields.
  1810. Referential integrity constraints are enforced for any
  1811. 1:MANY relationships to the Primary file.
  1812.  
  1813. Initial field values from the Data Dictionary are
  1814. pre-loaded during an ADD.  Range checking is generated from
  1815. the Data Dictionary definitions and is enforced during ADD
  1816. or CHANGE.  If an out of range condition exists, the user is
  1817. notified of the valid range for the field, and the cursor is
  1818. placed on that field for editing.
  1819.  
  1820. The template generates GET statements to access secondary
  1821. files where the relationship is defined as MANY:1.  The
  1822. "Must be in File" automatic field entry validation from the
  1823. Data Dictionary is enforced when the user presses the OK
  1824. button. If the value entered in the field does not exist
  1825. in the specified file, the user is notified and is placed
  1826. back on the field.  Use the "When Field is Completed"
  1827. Procedure line if you wish to call a Validate procedure.
  1828.  
  1829. If the application is set to SHARE files, the procedure
  1830. enforces multi-user concurrency checking at the record
  1831. level.  If a conflict arises from two or more workstations
  1832. attempting to update the same record, the user's Screen is
  1833. refreshed with the record as changed by the other
  1834. workstation, the user is notified of the change, and placed
  1835. back in edit mode.
  1836.  
  1837. <  Referential Integrity>
  1838. If Relational Constraints have been defined in the Data
  1839. Dictionary, code is generated to enforce the Constraint on
  1840. 1:MANY relationships. All Referential Integrity Constraints
  1841. are enforced from the Primary file for the procedure, down
  1842. its Relational File Tree for as many levels as exist.
  1843.  
  1844. <  Transaction Framing >
  1845. During a relational Change or Delete a HOLD is placed on
  1846. the Primary file record.  All child files of the Primary
  1847. file are updated within a transaction frame to ensure an
  1848. 'all or nothing' update or delete.  If LOGOUT cannot be
  1849. initiated, the user is given a chance to retry the update or
  1850. delete.
  1851.  
  1852. <  No Transaction Framing >
  1853. Not all file drivers support transaction processing. If the
  1854. file driver does not support the LOGOUT statement, code is
  1855. generated to update the files without the benefit of a
  1856. transaction frame. Also, if the files in the Relationship
  1857. use multiple file drivers, the referential update/delete
  1858. cannot use the LOGOUT statement. For example, if a file
  1859. relationship is defined with one file using the Btrieve
  1860. driver and the related file using the Clarion driver, code
  1861. is generated without a LOGOUT transaction frame.  Either
  1862. situation has the potential to compromise the referential
  1863. integrity of your database.  If the update/delete fails for
  1864. any reason, your files cannot be restored to their original
  1865. state.
  1866.  
  1867. <Formatter Support>
  1868. Formatter Support
  1869.  
  1870. The default screen contained in CLARION.APP has a local
  1871. variable named LOC:Message placed at the top of the entry
  1872. screen. This variable is used to inform the user of the
  1873. current action: Add, Change, or Delete of the record on the
  1874. screen.  The message displayed is stored in CLARION.APP in
  1875. the global variables as GLO:InsertMsg, GLO:ChangeMsg, and
  1876. GLO:DeleteMsg.
  1877.  
  1878. You can enter your own messages on the Procedure Properties
  1879. window. If any Prompt for a message is filled in, it will be
  1880. used instead of the global values stored in the default
  1881. .APPfile.
  1882.  
  1883. The default screen has two buttons: Ok and Cancel.
  1884.  
  1885. If a Pulldown structure has been created by the Pulldown
  1886. Menu Formatter, it is generated after the screen structure.
  1887. The Pulldown is OPENed after the screen structure, and is
  1888. closed upon exit from the procedure.
  1889.  
  1890. The Report Formatter is not supported.
  1891.  
  1892. <Property Fields>
  1893. Property Fields
  1894.  
  1895. <  Insert Message>
  1896. Insert Message
  1897.      Enter a message to use instead of the default stored in
  1898.      CLARION.APP for Inserting a record.
  1899.  
  1900. <  Change Message>
  1901. Change Message
  1902.      Enter a message to use instead of the default stored
  1903.      in CLARION.APP for Changing a record.
  1904.  
  1905. <  Delete Message>
  1906. Delete Message
  1907.      Enter a message to use instead of the default stored
  1908.      in CLARION.APP for Deleting a record.
  1909.  
  1910. <  Action after ADD>
  1911. Action after ADD
  1912.      The template supports multiple adds without leaving
  1913.      the FORM screen.  There are four possible actions after
  1914.      an ADD:
  1915.  
  1916.      "Return to caller " generates code to return to the
  1917.      calling procedure after the record is added.
  1918.  
  1919.      "Retain Record" generates code to allow continuous
  1920.      ADDs without clearing the record buffer or the screen.
  1921.      When the user selects the 'Ok' button the record
  1922.      buffer's contents are ADDed to the file and the user
  1923.      is placed back on the first entry field on the screen.
  1924.      If there are Auto-increment keys defined for the file,
  1925.      the record is saved, the next Autonumber is retrieved,
  1926.      then the record is restored.
  1927.  
  1928.      "Clear Record " generates code to allow continuous
  1929.      ADDs but clears the record buffer and screen between
  1930.      each ADD.  When the user selects the Ok button the
  1931.      screen and record buffer are cleared and the user is
  1932.      placed back on the first entry field on the screen. If
  1933.      there are Auto-increment keys defined for the file, the
  1934.      next Autonumber is retrieved and the screen updated.
  1935.  
  1936. <  Copy field hotkey:>
  1937. Copy field hotkey:
  1938.      This prompt is dependent on the 'Retain_Record'
  1939.      button. If "Retain Record" is selected, AND the "Copy
  1940.      field hotkey" contains a hotkey value, the template
  1941.      generates code for repeated ADDs that allows the user
  1942.      to duplicate individual fields from the prior record
  1943.      only when the hotkey is pressed.
  1944.  
  1945.      When the user presses the Ok button, the screen fields are
  1946.      erased and the cursor is placed back on the first
  1947.      field. If the user presses the defined hotkey the
  1948.      contents of the currently highlighted field are copied
  1949.      from the last record the user added.
  1950.  
  1951. <  Next Procedure>
  1952. Next Procedure
  1953.      Enter the Procedure to call when the Ok button is
  1954.      pressed (or the form has been "completed"), AFTER the
  1955.      file's update has completed without any errors.  The
  1956.      Next Procedure call is generated before the code for
  1957.      any Repeated ADDs.
  1958.  
  1959. <Embedded Source>
  1960. Embedded Source
  1961.  
  1962. <  Data Section >
  1963. "Data Section"
  1964.      In the data section of the procedure after local data, the
  1965.      screen and pulldown structures. This may be used to
  1966.      declare any data which you may want to use only in
  1967.      your embedded source code.
  1968.  
  1969. <  Setup Procedure >
  1970. "Setup Procedure"
  1971.      Source code is inserted after the CODE statement.
  1972.  
  1973. <  On Add After Record Buffer Is Cleared >
  1974. "On Add After Record Buffer Is Cleared"
  1975.      Immediately after the record buffer is cleared for an
  1976.      AddRecord and just before auto-incrementing fields are
  1977.       incremented or fields with initial values are
  1978.      initialized.
  1979.  
  1980. <  Setup Screen >
  1981. "Setup Screen"
  1982.      After OPEN(Screen).
  1983.  
  1984. <  Before File I/O >
  1985. "Before File I/O"
  1986.      Immediately before the record is written to disk
  1987.      (ADD, PUT, or DELETE).
  1988.  
  1989. <  Setup Next Procedure >
  1990. "Setup Next Procedure"
  1991.      If a 'Next Procedure' was defined, code is inserted
  1992.      before the procedure is called.
  1993.  
  1994. <  Return from Next Procedure >
  1995. "Return from Next Procedure"
  1996.      If a 'Next Procedure' was defined, code is inserted
  1997.      after the procedure is executed.
  1998.  
  1999. <  After ADD on Retain or ClearRecord >
  2000. "After ADD on Retain or ClearRecord"
  2001.      After a record has been added and just before going on to add
  2002.      another record in "recursive add mode."
  2003.  
  2004. <  End of Procedure >
  2005. "End of Procedure"
  2006.      Code placed in this window executes after all other
  2007.      code in the procedure has executed. This code begins in
  2008.      column one, therefore you may use this window to write
  2009.      any ROUTINEs which are called from any other embedded
  2010.      source code window.
  2011.  
  2012. <Formula Classes>
  2013. Formula Classes
  2014.  
  2015. <  SETUP >
  2016. SETUP
  2017.      A Conditional or Computed Field with "SETUP" in the
  2018.      Formula Class field is calculated once at the beginning
  2019.      of the procedure before the screen field processing
  2020.      LOOP.
  2021.  
  2022. <  RETURN >
  2023. RETURN
  2024.      A Conditional or Computed Field with "RETURN" in the
  2025.      Formula Class field is calculated once just before the
  2026.      return from the procedure when the user selects the
  2027.      'Ok' button.
  2028.  
  2029. <  PRIMEKEY >
  2030. PRIMEKEY
  2031.      A Conditional or Computed Field with "PRIMEKEY" in the
  2032.      Formula Class field is calculated just before the
  2033.      SET(Key,Key) during an Autoincrement ADD. It is
  2034.      inserted again right before the ADD(File) to preserve
  2035.      any components you have primed.
  2036.  
  2037.      This can be used to prime key components to enable
  2038.      subset numbering. For example, it can be used to cause
  2039.      autonumbering of line item numbers on an invoice.  If
  2040.      you have defined a key with the fields InvoiceNumber
  2041.      and LineItemNo, supply the current InvoiceNumber as a
  2042.      PRIMEKEY Formula.  The AutoNumber Routine determines
  2043.      the next available LineItemNo for that invoice.  The
  2044.      record ADDed to the file will already have
  2045.      InvoiceNumber and LineItemNo in the record buffer and
  2046.      on disk.
  2047.  
  2048. <  No class (blank) >
  2049. No class (blank)
  2050.      Calculates the formula every time any field on the
  2051.      screen is completed. The calculation code is
  2052.      generated before the field setup routines at the top
  2053.      of the processing LOOP.
  2054.  
  2055.  
  2056. <<The List Template>>
  2057. <General Information>
  2058.  
  2059. The "List" template generates a procedure that scrolls data
  2060. files on the screen like a spreadsheet.  Unlike the Browse,
  2061. Lookup, or Validate templates the List template loads every
  2062. selected record from the file into memory before displaying the
  2063. list box.
  2064.  
  2065. The Queue for the list box must keep track of key values and
  2066. pointer fields as well as the information displayed in the list
  2067. box. Therefore, Using the list template for a very large file
  2068. would fill virtual memory and overflow onto disk.  In effect the
  2069. file is being copied before it is displayed.  For this reason,
  2070. the List template should only be used to display relatively
  2071. small files or relatively small sections of large files.
  2072.  
  2073. Selected fields from the data file are displayed as columns in
  2074. a list box.  Columns that do not fit in the list box are
  2075. displayed using a mouse with the horizontal scroll bar or the
  2076. left and right arrow keys.
  2077.  
  2078. A selector bar is always positioned over a single row.  The up
  2079. and down arrow keys move the selector bar.  Moving the selector
  2080. bar up off the top row or down off the bottom row scrolls a new
  2081. record into the list box.  The PGUP and PGDN keys scroll the
  2082. prior and next pages of records into the list box.  CTRL-PGUP
  2083. displays the first page of records and CTRL-PGDN displays the
  2084. last page of records. Pressing the right mouse button in the top
  2085. half of the list box scrolls up and in the bottom half scrolls
  2086. down.  The list box field must be the first field in the screen
  2087. structure when not using a record filter or record selector.
  2088.  
  2089. Fields may be placed before or after the list box field in the
  2090. Field List.  Selecting the LIST field from a prior field
  2091. displays the first page of records.  The "Insert", "Change", and
  2092. "Delete" pushbuttons, or any other field that processes the
  2093. record under the selector bar must be placed after the LIST
  2094. field in the Field List.
  2095.  
  2096. A checkbox is available to view a file in Record order. This is
  2097. primarily useful in viewing ASCII files.  Since ASCII, BASIC,
  2098. and DOS files have certain limitations, you should know the file
  2099. system's capabilities before attempting to use the List template
  2100. with an Update Procedure. (The View template may be used to just
  2101. View an ASCII file.) If the Checkbox is checked on, any
  2102. reference to a primary key is ignored by this procedure.
  2103.  
  2104. Also, a checkbox is available to display the queue in reverse
  2105. order. When the Record Order checkbox is not checked, the
  2106. Reverse Order checkbox will display the file in reverse key
  2107. order. If Both the Record Order checkbox, and the Reverse Order
  2108. checkbox are on then the file will be displayed in reverse
  2109. record order.
  2110.  
  2111. A set of display-only fields can be designated as "hot fields"
  2112. on screen.  Hot fields display values from the record currently
  2113. highlighted by the selector bar and change whenever the selector
  2114. bar moves.  This allows display of more information from the
  2115. highlighted record than just the one line in the List box.
  2116. These hot fields MUST appear consecutively in the Field List but
  2117. may be placed anywhere on screen.
  2118.  
  2119. <Formatter Support>
  2120. Formatter Support
  2121.  
  2122. The "List" procedure in CLARION.APP is pre-loaded with a screen
  2123. layout containing a list box and pushbuttons named "Insert",
  2124. "Change", "Delete", and "Exit".  The field equate label of the
  2125. list box must be "?List".
  2126.  
  2127. The horizontal scroll bar can be turned off if the required
  2128. information fits in the list box.  The vertical scroll bar is
  2129. also optional.  All other properties of the list box can be
  2130. changed.
  2131.  
  2132. Fields from related files may be scrolled in the list box as
  2133. "lookups" will be done automatically from the Primary file in
  2134. the file schematic to Secondary files with a "Many to 1"
  2135. relationship.
  2136.  
  2137. The "Insert", "Change", and "Delete" pushbuttons call an update
  2138. procedure to process the selected record.  (The update procedure
  2139. is now normally created with a "Form" template.) The name of the
  2140. procedure must be entered as the "Update Procedure".  If there
  2141. is no update procedure, these pushbuttons can be deleted. If all
  2142. three pushbuttons are deleted, yet an update procedure exists,
  2143. the Insert, Enter and Delete keys will Insert, Change and Delete
  2144. while the list box is selected. However, If only one or two of
  2145. these buttons have been removed the function of that button
  2146. (Insert, Change, or Delete) will be removed from the list box as
  2147. well and no update procedure will be called.  The "Exit"
  2148. pushbutton should not be deleted.
  2149.  
  2150. Local data is generated before the screen structure.  If a
  2151. pulldown structure has been created by the Pulldown Menu
  2152. Formatter, it is generated after the screen structure.  The
  2153. template makes no provision for opening or closing a pulldown
  2154. menu.  Such statements must be entered as embedded source. The
  2155. Report Formatter is not supported.
  2156.  
  2157. <Property Fields>
  2158. Property Fields
  2159.  
  2160. <  Range Limit Field:>
  2161. Range Limit Field:
  2162.      The range of records to be displayed can be limited by fixing
  2163.      the value of a component of the primary file access key.  For
  2164.      example, line items on an invoice can be limited to a single
  2165.      invoice.  The key for the item file might contain ITM:Invoice
  2166.      and ITM:Line containing the invoice number and line number of
  2167.      the item.
  2168.  
  2169.      ITM:Invoice would be the Range Limit Field, displaying only
  2170.      those records for a fixed invoice number.
  2171.  
  2172. <  Range Value Field:>
  2173. Range Value Field:
  2174.      The Range Value Field is the field which holds the value to
  2175.      be used as the limiting key component value.  The key
  2176.      component will be assigned this value.
  2177.  
  2178.      In this example, the current Invoice record might contain the
  2179.      number of the invoice that is being displayed.  INV:Number
  2180.      would be the Range Value Field, supplying the value for the
  2181.      Range Limit Field.  The Range Value Field must not be the
  2182.      same field as the Range Limit Field.
  2183.  
  2184. <  Record Filter:>
  2185. Record Filter:
  2186.      There are 2 ways to enter a record filter:
  2187.  
  2188.      The formula generator can be used with a formula class of
  2189.      'FILTER' to validate the expression as entered.
  2190.  
  2191.      Enter a free-form record filter expression in this field.  No
  2192.      validation is done on the code you enter -- an invalid
  2193.      expression will generate compiler errors.  If you are not
  2194.      familiar with the Clarion language statements or expressions,
  2195.      do not use this entry -- use a Formula field with the FILTER
  2196.      Formula Class instead.
  2197.  
  2198. <  Update Procedure:>
  2199. Update Procedure:
  2200.      Enter the name of the update procedure to be used to insert,
  2201.      change, or delete records.  If no update procedure is
  2202.      entered, the "Insert", "Change", and "Delete" pushbuttons
  2203.      should be removed from the screen layout.
  2204.  
  2205.      Special considerations may exist when using ASCII, DOS, and
  2206.      BASIC file drivers.  In some cases a PUT or DELETE is not
  2207.      allowed.  See the file driver's documentation for file driver
  2208.      specifics.
  2209.  
  2210. <  First Hot Field:>
  2211. First Hot Field:
  2212.      Hot fields are a set of display-only fields that display the
  2213.      contents of the record under the selector bar.  They must
  2214.      appear consecutively in the Field List.
  2215.  
  2216.      Enter the name of the first hot field.
  2217.  
  2218. <  Last Hot Field:>
  2219. Last Hot Field:
  2220.      Enter the name of the last hot field.
  2221.  
  2222. <  Enable Hot Records >
  2223. [√] Enable Hot Records
  2224.      By enabling hot records the programmer has complete control
  2225.      at every list box movement from the Browse manager. With this
  2226.      option enabled, every movement of the point bar gets the
  2227.      record under the point bar into memory, looks up any many to
  2228.      one secondary files, computes any general formulas and
  2229.      executes any embedded source code which was entered in the
  2230.      'Process Selected Record' code window.
  2231.  
  2232. <  Queue Rebuild>
  2233. [√] Queue Rebuild
  2234.      This checkbox causes the QUEUE to be rebuilt after each call
  2235.      to the update procedure.  This is suggested when using shared
  2236.      files, or when calling a form with multiple add capability.
  2237.  
  2238. <  Record Order >
  2239. [√] Record Order
  2240.      Checking this box causes the template to ignore any key file
  2241.      access information.  The following must be considered:
  2242.  
  2243.      - The Access Key in the File Schematic will be ignored.
  2244.      - Range Limits will not be used.
  2245.  
  2246.      This option was created to allow the view of ASCII, DOS, and
  2247.      BASIC files.
  2248.  
  2249. <  Reverse Order>
  2250. [√] Reverse Order
  2251.      This checkbox will reverse the order in which the Queue will
  2252.      be built.  This allows a reverse key file listing of records
  2253.      in file systems which do not support descending keys.
  2254.  
  2255. <  Progress Indicator>
  2256. [√] Progress Indicator
  2257.      Checking the Progress Indicator Checkbox will display a
  2258.      moving bar across the screen as records are loaded into the
  2259.      QUEUE.  The bar is displayed in the Local Data variable named
  2260.      StatusLine which has been pre loaded into the Default
  2261.      Application file.  This line has also been placed on the
  2262.      default screen for the List template and must be in the
  2263.      screen list after the list box.
  2264.  
  2265. <  Progress Character:>
  2266. Progress Character:
  2267.      You may enter the ASCII character to be used as the 'bar.'
  2268.      Easy entry of high order ascii characters may be made by
  2269.      using the ASCII value found in the ASCII chart from the Tools
  2270.      menu.  The ASCII value should be surrounded by angle brackets
  2271.      within single quotes.  The Default Application file is
  2272.      preloaded with a shaded bar character '<176>'.
  2273.  
  2274. <Embedded Source>
  2275. Embedded Source
  2276.  
  2277. <  Data Section>
  2278. "Data Section"
  2279.      In the data section of the procedure after local data, the
  2280.      screen and pulldown structures.  This may be used to declare
  2281.      any data which you may want to use only in your embedded
  2282.      source code.
  2283.  
  2284. <  Setup Procedure>
  2285. "Setup Procedure"
  2286.      After the CODE statement.
  2287.  
  2288. <  Setup Screen>
  2289. "Setup Screen"
  2290.      After OPEN(Screen) statement.
  2291.  
  2292. <  Setup Pulldown>
  2293. "Setup Pulldown"
  2294.      After OPEN(PullDown) statement.
  2295.  
  2296. <  LIST Class Formula>
  2297. "LIST Class Formula"
  2298.      After generation of LIST class formulas.  This embedded code
  2299.      window may be used instead of LIST class formulas.  This will
  2300.      allow setting up any fields which are displayed within the
  2301.      scrolling listbox.
  2302.  
  2303. <  End of General Formulas>
  2304. "End of General Formulas"
  2305.      When processing a screen field, the formulas which do not
  2306.      have a class of 'FILTER' of 'LIST' will be generated.  This
  2307.      embedded source window allows the entry of computations for
  2308.      screen display fields without the use of the formula
  2309.      formatter.
  2310.  
  2311. <  End of Procedure>
  2312. "End of Procedure"
  2313.      Code placed in this window executes after all other code in
  2314.      the procedure has executed.  This code begins in column one,
  2315.      therefore you may use this window to write any ROUTINEs which
  2316.      are called from any other embedded source code window.
  2317.  
  2318. <  When Screen Field is Selected : >
  2319. "When Screen Field is Selected : "
  2320.      In the CASE SELECTED() structure, executed when the field is
  2321.      selected for entry.
  2322.  
  2323. <  When Screen Field is Completed: >
  2324. "When Screen Field is Completed: "
  2325.      In the CASE FIELD() structure, executed when the field has
  2326.      been completed.
  2327.  
  2328. <Formula Classes>
  2329.  Formula Classes
  2330.  
  2331. <  FILTER>
  2332. FILTER
  2333.      A conditional formula of class "FILTER" created by the
  2334.      Formula Formatter is used to select which records are
  2335.      displayed.  If the conditional formula evaluates to zero
  2336.      (false) for a given record, it is not displayed.
  2337.  
  2338. <  LIST >
  2339. LIST
  2340.      A Conditional or Computed Field with "LIST" in the Formula
  2341.      Class field is used for those values which will be displayed
  2342.      in the list box and are only evaluated when the list box item
  2343.      is created.
  2344.  
  2345. <  No class (blank)>
  2346. No class (blank)
  2347.      Calculates the formula every time any field on the screen is
  2348.      completed.  The calculation code is generated before the
  2349.      field setup routines at the top of the processing LOOP.
  2350.  
  2351.  
  2352. <<The Lookup Template>>
  2353. <General Information>
  2354.  
  2355. The "Lookup" template generates a procedure that will be used to
  2356. preform entry field verification.  The procedure MUST be called
  2357. as a When Field is Selected Procedure on the entry field to
  2358. validate.  When the entry field has been selected, the Lookup
  2359. procedure will be called to check for the existence of the value
  2360. in the current field against the specified key. If no match is
  2361. found a screen with a list box is presented to allow the user to
  2362. select a valid entry.
  2363.  
  2364. Selected fields from the data file are displayed as columns in
  2365. a list box.  Columns that do not fit in the list box are
  2366. displayed using the horizontal scroll bar or the left and right
  2367. arrow keys.
  2368.  
  2369. A selector bar is always positioned over a single row.  The up
  2370. and down arrow keys move the selector bar.  Moving the selector
  2371. bar up off the top row or down off the bottom row scrolls a new
  2372. record into the list box.  The PGUP and PGDN keys scroll the
  2373. prior and next pages of records into the list box.  CTRL-PGUP
  2374. displays the first page of records and CTRL-PGDN displays the
  2375. last page of records.  Pressing the right mouse button in the
  2376. top half of the list box scrolls up and in the bottom half
  2377. scrolls down.  The ENTER key and the mouse double-click selects
  2378. the highlighted record and completes the procedure.
  2379.  
  2380. The Lookup Template uses PRESS to place the selected value into
  2381. the entry field it was called to validate.  Therefore, if
  2382. numeric data is being validated, the typing mode of that field
  2383. should be INSERT.  This allows PRESS to put the correct value
  2384. into the field.
  2385.  
  2386. The "Select", "Insert" and "Change" pushbuttons, or any other
  2387. field that processes the record under the selector bar must be
  2388. placed after the LIST field in the Field List.
  2389.  
  2390. An optional locator field finds a specific record in the file.
  2391. Typing any letter while the LIST field is active selects the
  2392. locator field.  Completing the locator field with a TAB key or
  2393. mouse CLICK displays the closest matching record at the top of
  2394. the list box.  Another option is an "incremental locator", which
  2395. allows a half-second pause for user entry into a locator field,
  2396. and then automatically finds the closest matching record to the
  2397. contents in the locator field.  The backspace key is active
  2398. during this process.  For numeric data types, it is recommended
  2399. to use a string picture type (for display purposes).  Date
  2400. fields are not recommended for incremental locators.
  2401.  
  2402. A set of display-only fields can be designated as "hot fields"
  2403. on screen.  Hot fields display values from the record currently
  2404. highlighted by the selector bar and change whenever the selector
  2405. bar moves.  This allows display of more information from the
  2406. highlighted record than just the one line in the List box.
  2407. These hot fields MUST appear consecutively in the Field List but
  2408. may be placed anywhere on screen.
  2409.  
  2410. When you define a SUM or AVG formula class, total field code
  2411. generation is automatically enabled.
  2412.  
  2413. <Formatter Support>
  2414. Formatter Support
  2415.  
  2416. The "Lookup" procedure in CLARION.APP is pre-loaded with a
  2417. screen layout containing a list box and pushbuttons named
  2418. "Select", "Insert", "Change" and "Exit". The field equate label
  2419. of the list box MUST be "?List" and the "Immediate" attribute
  2420. MUST be on turned on.  The horizontal scroll bar can be turned
  2421. off if the required information fits in the list box.  All other
  2422. properties of the list box can be changed.
  2423.  
  2424. Fields from related files may be scrolled in the list box as
  2425. "lookups" will be done automatically from the Primary file in
  2426. the file schematic to Secondary files with a "Many to 1"
  2427. relationship.  "1 to Many" relationships are not supported by
  2428. this procedure Template.
  2429.  
  2430. The "Insert" and "Change" pushbuttons call an update procedure
  2431. to process the selected record (normally created with a "Form"
  2432. template).  The name of the procedure must be entered as the
  2433. "Update Procedure".  If there is no update procedure, these
  2434. pushbuttons may be deleted.  The ENTER key and mouse DOUBLE-
  2435. CLICK while on the listbox will select the record under the
  2436. selector bar and enter the value in the entry field.  The "Exit"
  2437. pushbutton should not be deleted.
  2438.  
  2439. Local data is generated before the screen structure.  If a
  2440. pulldown structure has been created by the Pulldown Menu
  2441. Formatter, it is generated after the screen structure.  The
  2442. template makes no provision for opening or closing a pulldown
  2443. menu (you must write embedded source for this).
  2444.  
  2445. <Property Fields>
  2446. Property Fields
  2447.  
  2448. <  Range Limit Field: >
  2449. Range Limit Field:
  2450.      The range of records to be displayed can be limited by fixing
  2451.      the value of a component of the primary file access key.  For
  2452.      example, line items on an invoice can be limited to a single
  2453.      invoice.  The key for the item file might contain ITM:Invoice
  2454.      and ITM:Line containing the invoice number and line number of
  2455.      the item.
  2456.  
  2457.      ITM:Invoice would be the Range Limit Field, displaying only
  2458.      those records for a fixed invoice number.
  2459.  
  2460. <  Range Value Field: >
  2461. Range Value Field:
  2462.      The Range Value Field is the field which holds the value to
  2463.      be used as the limiting key component value.  The key
  2464.      component will be assigned this value.
  2465.  
  2466.      In this example, the current Invoice record might contain the
  2467.      number of the invoice that is being displayed.  INV:Number
  2468.      would be the Range Value Field, supplying the value for the
  2469.      Range Limit Field.  The Range Value Field must not be the
  2470.      same field as the Range Limit Field.
  2471.  
  2472. <  Record Filter:>
  2473. Record Filter:
  2474.      There are 2 ways to enter a record filter:
  2475.  
  2476.      The formula generator can be used with a formula class of
  2477.      'FILTER' to validate the expression as entered.
  2478.  
  2479.      Enter a free-form record filter expression in this field.  No
  2480.      validation is done on the code you enter -- an invalid
  2481.      expression will generate compiler errors.  If you are not
  2482.      familiar with the Clarion language statements or expressions,
  2483.      do not use this entry -- use a Formula field with the FILTER
  2484.      Formula Class instead.
  2485.  
  2486. <  Lookup Field: >
  2487. Lookup Field:
  2488.      Enter the name of the field to be used to validate against
  2489.      your entry field.  This field should be the only field in a
  2490.      single-component unique key.
  2491.  
  2492. <  Input Field Picture: >
  2493. Input Field Picture:
  2494.      Some fields do not appear on screen in the same format as the
  2495.      data exists in the file (and in the key).  These fields must
  2496.      have an Input Field Picture to DEFORMAT the data for
  2497.      validation and to FORMAT the selected data for on-screen
  2498.      display.
  2499.  
  2500.      Enter the display picture to DEFORMAT the data for
  2501.      validation.  This picture is also used to FORMAT the data to
  2502.      PRESS it into the keyboard buffer and fill the entry field
  2503.      when a record is selected from this procedure's list.
  2504.  
  2505.      Examples of fields which require an Input Field Picture:
  2506.  
  2507.      Any STRING, CSTRING, or PSTRING with an implied decimal
  2508.      storage picture (for example, @N6v2).
  2509.  
  2510.      Any numeric data field (LONG, DATE, USHORT, etc.) with a date
  2511.      (@D1, @D2, etc.) or time (@T1, @T2, etc.) display picture.
  2512.  
  2513.      Any numeric data field (REAL, BFLOAT, etc.) with a display
  2514.      picture which includes a decimal portion (for example,
  2515.      @N6.2).
  2516.  
  2517. <  Locator Field: >
  2518. Locator Field:
  2519.      A locator field is a screen entry field that updates a
  2520.      component of the primary file access key.  When a locator
  2521.      field is entered, the closest matching record is displayed in
  2522.      the list box.
  2523.  
  2524.      For example, scrolling a vendor file in vendor name sequence
  2525.      uses a key that contains the vendor name field (e.g.
  2526.      VND:Name).  To create a vendor name locator field, place a
  2527.      VND:Name entry field on the screen below the list box and
  2528.      enter VND:Name for the Locator Field.
  2529.  
  2530.      Once the user types a character on the keyboard, the locator
  2531.      field is selected and allows entry for the match.  Pressing
  2532.      the Tab key positions the point bar to the closest match.
  2533.  
  2534.      Another option is "Incremental Locator".  This template
  2535.      option allows one-half second for the user to type a new
  2536.      letter into the locator field.  At each pause longer than
  2537.      one-half second, the field contents are used to locate the
  2538.      closest match (the Tab key does not need to be pressed).  The
  2539.      backspace key is active during this process.
  2540.  
  2541. <  Incremental Locator  >
  2542. [√] Incremental Locator
  2543.      Check this box to indicate that the Locator Field will act as
  2544.      an incremental locator.
  2545.  
  2546. <  Display Key: >
  2547. Display Key:
  2548.      If using one key for entry field validation and another key
  2549.      as the display key, enter the name of the display key here.
  2550.      Otherwise, leave this field blank.
  2551.  
  2552. <  Update Procedure: >
  2553. Update Procedure:
  2554.      Enter the name of the update procedure to be used to insert,
  2555.      change, or delete records.  If no update procedure is
  2556.      entered, the "Insert", "Change", and "Delete" pushbuttons
  2557.      should be removed from the screen layout.
  2558.  
  2559. <  First Hot Field: >
  2560. First Hot Field:
  2561.      Hot fields are a set of display-only fields that display the
  2562.      contents of the record under the selector bar.  They must
  2563.      appear consecutively in the Field List.
  2564.  
  2565.      Enter the name of the first hot field.
  2566.  
  2567. <  Last Hot Field: >
  2568. Last Hot Field:
  2569.      Enter the name of the last hot field.
  2570.  
  2571. <  Enable Hot Records >
  2572. [√] Enable Hot Records
  2573.      By enabling hot records the programmer has complete control
  2574.      at every list box movement from the Browse manager. With this
  2575.      option enabled, every movement of the point bar gets the
  2576.      record under the point bar into memory, looks up any many to
  2577.      one secondary files, computes any general formulas and
  2578.      executes any embedded source code which was entered in the
  2579.      'Process Selected Record' code window.
  2580.  
  2581. <Embedded Source>
  2582. Embedded Source
  2583.  
  2584. <  Data Section >
  2585. "Data Section"
  2586.      In the data section of the procedure after local data, the
  2587.      screen and pulldown structures.  This may be used to declare
  2588.      any data which you may want to use only in your embedded
  2589.      source code.
  2590.  
  2591. <  Setup Procedure >
  2592. "Setup Procedure"
  2593.      After the CODE statement.
  2594.  
  2595. <  Setup Screen >
  2596. "Setup Screen"
  2597.      After OPEN(Screen).
  2598.  
  2599. <  Setup Pulldown>
  2600. "Setup Pulldown"
  2601.      After OPEN(PullDown) statement.
  2602.  
  2603. <  Set to First Record Before Total Loop>
  2604. "Set to First Record Before Total Loop"
  2605.      After the SET(key,key) for Range limits before beginning the
  2606.      total calculation LOOP.
  2607.  
  2608. <  Inside Total Loop, Immediately after NEXT>
  2609. "Inside Total Loop, Immediately after NEXT"
  2610.      Immediately after each record is read in the total
  2611.      calculation LOOP.
  2612.  
  2613. <  Inside Total Loop after Filter>
  2614. "Inside Total Loop after Filter"
  2615.      After each record is read and filter conditions are evaluated
  2616.      in the total calculation LOOP.
  2617.  
  2618. <  After Total Field Loop>
  2619. "After Total Field Loop"
  2620.      After all totals have been calculated.
  2621.  
  2622. <  LIST Class Formula>
  2623. "LIST Class Formula"
  2624.      After generation of LIST class formulas.  This embedded code
  2625.      window may be used instead of LIST class formulas.  This will
  2626.      allow setting up any fields which are displayed within the
  2627.      scrolling listbox.
  2628.  
  2629. <  End of General Formulas>
  2630. "End of General Formulas"
  2631.      When processing a screen field, the formulas which do not
  2632.      have a class of 'FILTER' of 'LIST' will be generated.  This
  2633.      embedded source window allows the entry of computations for
  2634.      screen display fields without the use of the formula
  2635.      formatter.
  2636.  
  2637. <  Case of No Records Found>
  2638. "Case of No Records Found"
  2639.      When no records are found to display.
  2640.  
  2641. <  After Filter and Range Check>
  2642. "After Filter and Range Check"
  2643.      After any record filter or Range limits are evaluated.
  2644.  
  2645. <  Set to First Record>
  2646. "Set to First Record"
  2647.      When using Range Limits, a SET statement is issued to locate
  2648.      the first record. This embedded source code window appears
  2649.      just after the SET statement and allows you to override the
  2650.      SET.
  2651.  
  2652. <  Set to Last Record>
  2653. "Set to Last Record"
  2654.      When using Range Limits, a SET statement is used to locate
  2655.      the closest match to the last record.  This embedded source
  2656.      code window appears just after the SET statement and allows
  2657.      you to override the SET.
  2658.  
  2659. <  Process Selected Record>
  2660. "Process Selected Record"
  2661.      When Enable Hot Records has been checked, code within this
  2662.      embedded source window will be executed upon movement of the
  2663.      point bar.  The record under the point bar will be retrieved
  2664.      into memory, any many to one secondary file records will be
  2665.      retrieved and any general formulas will be computed just
  2666.      prior to the insertion of this embedded source code.
  2667.  
  2668. <  End of Procedure>
  2669. "End of Procedure"
  2670.      Code placed in this window executes after all other code in
  2671.      the procedure has executed.  This code begins in column one,
  2672.      therefore you may use this window to write any ROUTINEs which
  2673.      are called from any other embedded source code window.
  2674.  
  2675. <  Prior to Update Procedure>
  2676. "Prior to Update Procedure"
  2677.      Immediately before the Update Procedure is called.
  2678.  
  2679. <  After Update Procedure>
  2680. "After Update Procedure"
  2681.      Immediately after return from the Update Procedure.
  2682.  
  2683. <  When Screen Field is Selected : >
  2684. "When Screen Field is Selected : "
  2685.      In the CASE SELECTED() structure, executed when the field is
  2686.      selected for entry.
  2687.  
  2688. <  When Screen Field is Completed: >
  2689. "When Screen Field is Completed: "
  2690.      In the CASE FIELD() structure, executed when the field has
  2691.      been completed.
  2692.  
  2693. <Formula Classes>
  2694. Formula Classes
  2695.  
  2696. <  LIST >
  2697. LIST
  2698.      A Conditional or Computed Field with "LIST" in the Formula
  2699.      Class field is used for those values which will be displayed
  2700.      in the list box and are only evaluated when the list box item
  2701.      is created.
  2702.  
  2703. <  SUM >
  2704. SUM
  2705.      A Computed Field with "SUM" in the Formula Class field
  2706.      calculates the total of the values contained in the field
  2707.      named in the Expression.  A Conditional Field with "SUM" in
  2708.      the Formula Class field conditionally calculates the total of
  2709.      the values contained in the fields named in the True and
  2710.      False Expressions.
  2711.  
  2712. <  AVG >
  2713. AVG
  2714.      A Computed Field with "AVG" in the Formula Class field
  2715.      calculates the arithmetic mean of the field named in the
  2716.      Expression.  A Conditional Field with "AVG" in the Formula
  2717.      Class field conditionally calculates the arithmetic mean of
  2718.      the fields named in the True and False Expressions.  In both
  2719.      cases, the total value is calculated, then divided by the
  2720.      number of records read to achieve that total.
  2721.  
  2722. <  No class (blank) >
  2723. No class (blank)
  2724.      Calculates the formula every time any field on the screen is
  2725.      completed.  The calculation code is generated before the
  2726.      field setup routines at the top of the processing LOOP.
  2727.  
  2728.  
  2729. <<The MemForm21 Template>>
  2730. <General Information>
  2731.  
  2732. The "MemForm21" template generates a procedure that processes a
  2733. screen created with the Screen Formatter.  The "MemForm21"
  2734. template is similar to a verion 2.1 "Form procedure using the
  2735. MEMORY file".   Therefore, it does not automatically write any
  2736. record to disk.  It  supports the (non-CUA) version 2.1
  2737. keystrokes:
  2738.  
  2739.   CtrlEsc ----------- Cancel
  2740.   CtrlEnter --------- Done
  2741.   Enter ------------- Field complete or Done (on last field)
  2742.   Esc --------------- Field return or Cancel (on first field)
  2743.  
  2744. <Formatter Support>
  2745. Formatter Support
  2746.  
  2747. The "MemForm21" procedure in CLARION.APP is pre-loaded with an
  2748. empty screen layout.  Local data is generated before the screen
  2749. structure.  If a pulldown structure has been created by the
  2750. Pulldown Menu Formatter, it is generated after the screen
  2751. structure.  The template makes no provision for opening or
  2752. closing a pulldown menu, or any files.  Such statements must be
  2753. entered as embedded source.  Statements from the Formula
  2754. Formatter  are generated at the top of the keyboard loop before
  2755. the field setup routines.  The Report Formatter is not
  2756. supported.
  2757.  
  2758. <Property Fields>
  2759. Property Fields
  2760.  
  2761. <  Next Procedure>
  2762. Next Procedure
  2763.      Enter the Procedure to call when the Ok button is pressed (or
  2764.      the screen has been "completed").
  2765.  
  2766. <Embedded Source>
  2767. Embedded Source
  2768.  
  2769. <  Data Section >
  2770. "Data Section"
  2771.      In the data section of the procedure, after local data and
  2772.      the report structure.  This may be used to declare any data
  2773.      which you may want to use only in your embedded source code.
  2774.  
  2775. <  Setup Procedure >
  2776. "Setup Procedure"
  2777.      After the CODE statement.
  2778.  
  2779. <  Setup Screen >
  2780. "Setup Screen"
  2781. After OPEN(Screen).
  2782.  
  2783. <  When Screen Field is Selected : >
  2784. "When Screen Field is Selected : "
  2785.      In the CASE SELECTED() structure, executed when the field is
  2786.      selected for entry.
  2787.  
  2788. <  When Screen Field is Completed: >
  2789. "When Screen Field is Completed: "
  2790.      In the CASE FIELD() structure, executed when the field has
  2791.      been completed.
  2792.  
  2793. <Formula Classes>
  2794. Formula Classes
  2795.  
  2796. <  SETUP >
  2797. SETUP
  2798.      A Conditional or Computed Field with "SETUP" in the Formula
  2799.      Class field is calculated once at the beginning of the
  2800.      procedure before the screen field processing LOOP.
  2801.  
  2802. <  RETURN >
  2803. RETURN
  2804.      A Conditional or Computed Field with "RETURN" in the Formula
  2805.      Class field is calculated once just before the return from
  2806.      the procedure when the user selects the 'Ok' button.
  2807.  
  2808. <  PRIMEKEY >
  2809. PRIMEKEY
  2810.      A Conditional or Computed Field with "PRIMEKEY" in the
  2811.      Formula Class field is calculated just before the
  2812.      SET(Key,Key) during an Autoincrement ADD.  It is inserted
  2813.      again right before the ADD(File) to preserve any components
  2814.      you have primed.
  2815.  
  2816.      This can be used to prime key components to enable subset
  2817.      numbering. For example, it can be used to cause autonumbering
  2818.      of line item numbers on an invoice.  If you have defined a
  2819.      key with the fields InvoiceNumber and LineItemNo, supply the
  2820.      current InvoiceNumber as a PRIMEKEY Formula.  The AutoNumber
  2821.      Routine determines the next available LineItemNo for that
  2822.      invoice.  The record ADDed to the file will already have
  2823.      InvoiceNumber and LineItemNo in the record buffer and on
  2824.      disk.
  2825.  
  2826. <  No class (blank) >
  2827. No class (blank)
  2828.      Calculates the formula every time any field on the screen is
  2829.      completed.  The calculation code is generated before the
  2830.      field setup routines at the top of the processing LOOP.
  2831.  
  2832.  
  2833. <<The Menu Template>>
  2834. <General Information>
  2835.  
  2836. The "Menu" template generates a procedure that displays a pop-up
  2837. menu used to execute other procedures.  Menu items are placed on
  2838. screen as BUTTON in the Screen Formatter.  The procedure
  2839. associated with each button must be its When Button is Pressed
  2840. Procedure.  At least one button field should have a "RETURN"
  2841. procedure call to exit the "Menu" procedure.
  2842.  
  2843. Other fields can be placed on the screen.  However, this
  2844. template makes no provision for accessing or updating data
  2845. files.
  2846.  
  2847. <Formatter Support>
  2848. Formatter Support
  2849.  
  2850. The "Menu" procedure in CLARION.APP is preloaded with a screen
  2851. layout containing a pushbutton named "Exit".  The "Exit"
  2852. pushbutton calls the "RETURN" procedure.  The "Exit" pushbutton
  2853. can be renamed, but if it is deleted, some other provision must
  2854. be made to return from the procedure.
  2855.  
  2856. Local data is generated before the screen structure.  If a
  2857. pulldown menu has been created by the Pulldown Menu Formatter,
  2858. it is generated after the screen structure.  However, the "Menu"
  2859. template makes no provision for opening or closing a pulldown
  2860. menu.  Such statements must be entered as embedded source.
  2861.  
  2862. The Report Formatter is not supported.
  2863.  
  2864. <Embedded Source>
  2865. Embedded Source
  2866.  
  2867. <  Data Section >
  2868. "Data Section"
  2869.      In the data section of the procedure after local data, the
  2870.      screen and pulldown structures.  This may be used to declare
  2871.      any data which you may want to use only in your embedded
  2872.      source code.
  2873.  
  2874. <  Setup Procedure >
  2875. "Setup Procedure"
  2876.      After the CODE statement.
  2877.  
  2878. <  Setup Screen >
  2879. "Setup Screen"
  2880.      After OPEN(Screen).
  2881.  
  2882. <  Top of Accept Loop>
  2883. "Top of Accept Loop"
  2884.      Immediately after the LOOP statement which processes each
  2885.      screen field.
  2886.  
  2887. <  End of Procedure>
  2888. "End of Procedure"
  2889.      Code placed in this window executes after all other code in
  2890.      the procedure has executed.  This code begins in column one,
  2891.      therefore you may use this window to write any ROUTINEs which
  2892.      are called from any other embedded source code window.
  2893.  
  2894. <  When Screen Field is Selected : >
  2895. "When Screen Field is Selected : "
  2896.      In the CASE SELECTED() structure, executed when the field is
  2897.      selected for entry.
  2898.  
  2899. <  When Screen Field is Completed: >
  2900. "When Screen Field is Completed: "
  2901.      In the CASE FIELD() structure, executed when the field has
  2902.      been completed.
  2903.  
  2904. <Formula Classes>
  2905. Formula Classes
  2906.  
  2907. No formula classes are supported by this procedure Template.
  2908. All statements from the Formula Formatter are generated at the
  2909. top of the keyboard loop before the field setup routines.
  2910.  
  2911.  
  2912. <<The Menu21 Template>>
  2913. <General Information>
  2914.  
  2915. The "Menu21" template generates a procedure that displays a
  2916. pop-up menu used to execute other procedures.  This is provided
  2917. for conversion of version 2.1 Menu Procedures.  The difference
  2918. between the "Menu" and "Menu21" procedure Templates are their
  2919. handling of the Esc and CtrlEsc keys.
  2920.  
  2921. Menu items are placed on screen as BUTTON fields in the Screen
  2922. Formatter.  The procedure associated with each button must be
  2923. its When Button is Pressed Procedure.
  2924.  
  2925. Other fields can be placed on the screen.  However, this
  2926. template makes no provision for accessing or updating data
  2927. files.
  2928.  
  2929. <Formatter Support>
  2930. Formatter Support
  2931.  
  2932. The "Menu21" procedure in CLARION.APP is preloaded with a screen
  2933. layout containing a pushbutton named "Exit".  The "Exit"
  2934. pushbutton calls the "RETURN" procedure.  The "Exit" pushbutton
  2935. can be renamed.
  2936.  
  2937. Local data is generated before the screen structure.  If a
  2938. pulldown menu has been created by the Pulldown Menu Formatter,
  2939. it is generated after the screen structure.  However, the "Menu"
  2940. template makes no provision for opening or closing a pulldown
  2941. menu.  Such statements must be entered as embedded source.
  2942.  
  2943. The Report Formatter is not supported.
  2944.  
  2945. <Embedded Source>
  2946. Embedded Source
  2947.  
  2948. <  Data Section >
  2949. "Data Section"
  2950.      In the data section of the procedure after local data, the
  2951.      screen and pulldown structures.  This may be used to declare
  2952.      any data which you may want to use only in your embedded
  2953.      source code.
  2954.  
  2955. <  Setup Procedure >
  2956. "Setup Procedure"
  2957.      After the CODE statement.
  2958.  
  2959. <  Setup Screen >
  2960. "Setup Screen"
  2961.      After OPEN(Screen).
  2962.  
  2963. <  Computed Fields>
  2964. "Computed Fields"
  2965.      Immediately after the any Formulas are calculated.
  2966.  
  2967. <  End of Procedure>
  2968. "End of Procedure"
  2969.      Code placed in this window executes after all other code in
  2970.      the procedure has executed.  This code begins in column one,
  2971.      therefore you may use this window to write any ROUTINEs which
  2972.      are called from any other embedded source code window.
  2973.  
  2974. <  When Screen Field is Selected : >
  2975. "When Screen Field is Selected : "
  2976.      In the CASE SELECTED() structure, executed when the field is
  2977.      selected for entry.
  2978.  
  2979. <  When Screen Field is Completed: >
  2980. "When Screen Field is Completed: "
  2981.      In the CASE FIELD() structure, executed when the field has
  2982.      been completed.
  2983.  
  2984. <Formula Classes>
  2985. Formula Classes
  2986.  
  2987. <  RETURN >
  2988. RETURN
  2989.      A Conditional or Computed Field with "RETURN" in the
  2990.      Formula Class field is calculated just before the
  2991.      return from the procedure when the user exits the
  2992.      procedure.
  2993.  
  2994. <  Blank (no class)>
  2995. Blank (no class)
  2996.      All formulas are generated at the top of the keyboard
  2997.      loop before the field setup routines.
  2998.  
  2999.  
  3000. <<The MultiPage Template>>
  3001. <General Information>
  3002.  
  3003. The "MultiPage" template is designed to work in conjunction with
  3004. the "PageOf" procedure template.  The "MultiPage" template
  3005. generates a procedure that will ADD, CHANGE or DELETE a
  3006. record from the procedures Primary data file.  The template
  3007. allows for multiple auto-increment key fields and
  3008. concurrency checks of multiple memo fields.  Relational
  3009. integrity constraints are enforced from the Primary file
  3010. down its relational tree, for all 1:MANY relationships.
  3011.  
  3012. The MultiPage and the PageOf templates are designed to work
  3013. together.  All file I/O is done by the MultiPage procedure.
  3014. Access to the PageOf procedures is handled thru MultiPage.  The
  3015. PageOf procedures are expected to use the same data file as the
  3016. MultiPage procedure. MultiPage passes each PageOf procedure
  3017. the (4) following parameters: the current Action (Add /
  3018. Change / Delete / Check_Required), the current Page number,
  3019. the total number of Pages, and the Message describing the
  3020. current update.
  3021.  
  3022. ┌─────────────┐
  3023. │  MultiPage  │ ( First page of a multi-page data entry form )
  3024. └──┬──────────┘
  3025.    │             Any 'PageOf' can be accessed directly from
  3026.    │             MultiPage by pressing the Alt key and the
  3027.    │             corresponding page number. Pressing the
  3028.    │             PageDown key from any page access the next
  3029.    │             available page. Pressing PageDown on the Last
  3030.    │             Page wraps around to the main (MultiPage) page.
  3031.    │
  3032.    ├────PageOf  (the page 2 procedure)
  3033.    ├────PageOf  (the page 3 procedure)
  3034.    ├────PageOf  (the page 4 procedure)
  3035.    ├────PageOf  (the page 5 procedure)
  3036.    ├────PageOf  (the page 6 procedure)
  3037.    ├────PageOf  (the page 7 procedure)
  3038.    ├────PageOf  (the page 8 procedure)
  3039.    └────PageOf  (the page 9 procedure)
  3040.  
  3041. The template supports up to eight (8) additional pages.
  3042. The PageOf procedure calls are all entered on the MultiPage
  3043. template's Procedure Properties window. Procedures named in
  3044. the Page prompts must use the "PageOf" procedure template.
  3045.  
  3046. At runtime the generated procedure tracks which "PageOf"
  3047. procedures have been called. When the user presses 'Ok'
  3048. any "PageOf" procedure which has not yet been accessed by
  3049. the user, will be called in order to check for 'Required'
  3050. fields. The PageOf procedure is called and immediately
  3051. placed in nonstop edit mode. If a required field has been
  3052. left blank, the user is notified and placed in edit mode.
  3053.  
  3054. Initial field values from the data dictionary are
  3055. pre-loaded during an ADD.  Range checking is generated from
  3056. the data dictionary definitions and is enforced during ADD
  3057. or CHANGE.  If an out of range condition exists the user is
  3058. notified of the valid range for the field, and the cursor is
  3059. placed on that field for editing.
  3060.  
  3061. The template generates lookups for accessing secondary files
  3062. where the relationship is defined as MANY:1.
  3063.  
  3064. The "Must be in File" automatic field validation is
  3065. enforced when the user selects OK.  If the value entered
  3066. does not exist in the specified file the user is notified
  3067. and is placed back on the field.
  3068.  
  3069. If the application is set to SHARE files, the procedure
  3070. enforces multi-user concurrency checking at the record
  3071. level.  If a conflict arises from two or more workstations
  3072. attempting to update the same record, the user's Screen is
  3073. refreshed with the record as changed by the other
  3074. workstation, the user is notified of the change, and placed
  3075. back in edit mode.
  3076.  
  3077. <  Referential Integrity>
  3078. If Relational Constraints have been defined in the Data
  3079. Dictionary, code is generated to enforce the Constraint on
  3080. 1:MANY relationships. All Referential Integrity Constraints
  3081. are enforced from the Primary file for the procedure, down
  3082. its Relational File Tree for as many levels as exist.
  3083.  
  3084. <  Transaction Framing >
  3085. During a relational Change or Delete a HOLD is placed on
  3086. the Primary file record.  All child files of the Primary
  3087. file are updated within a transaction frame to ensure an
  3088. 'all or nothing' update or delete.  If LOGOUT cannot be
  3089. initiated, the user is given a chance to retry the update or
  3090. delete.
  3091.  
  3092. <  No Transaction Framing >
  3093. Not all file drivers support transaction processing. If the file
  3094. driver does not support the LOGOUT statement, code is generated
  3095. to update the files without the benefit of a transaction frame.
  3096. Also, if the files in the Relationship use multiple file drivers,
  3097. the referential update/delete cannot use the LOGOUT statement.
  3098. For example, if a file relationship is defined with one file
  3099. using the Btrieve driver and the related file using the Clarion
  3100. driver, code is generated without a LOGOUT transaction frame.
  3101. Either situation has the potential to compromise the referential
  3102. integrity of your database.  If the update/delete fails for
  3103. any reason, your files cannot be restored to their original
  3104. state.
  3105.  
  3106. Finally, if you have set up multiple relations between the
  3107. same two files, transaction framing cannot process these
  3108. relations.  This will be evident at run-time as a Clarion
  3109. Run-Time error, Cannot Logout Files.  In this case, check
  3110. the Disable RI Logout Check-box on the Procedures Property
  3111. screen.
  3112.  
  3113. <Formatter Support>
  3114. Formatter Support
  3115.  
  3116. The default screen contained in CLARION.APP has a local
  3117. variable named LOC:Message placed at the top of the entry
  3118. screen. This variable is used to inform the user of the
  3119. current action: Add, Change, or Delete of the record on the
  3120. screen.  The message displayed is stored in CLARION.APP in
  3121. the global variables GLO:InsertMsg, GLO:ChangeMsg, and
  3122. GLO:DeleteMsg respectively.
  3123.  
  3124. The programmer can enter his own messages on the Procedure
  3125. Properties window. If any Prompt for a message is filled
  3126. in, it will be used instead of the global values stored in
  3127. the default .APP file.
  3128.  
  3129. The default screen also has two local variables for page
  3130. number display; LOC:Page and LOC:Pages. These variables
  3131. are used to display the current page (LOC:Page), and the
  3132. total number of pages (LOC:Pages).
  3133.  
  3134. The template places an ALRT attribute for the Alt-# key for
  3135. each procedure named in the Page prompts.  Each page
  3136. procedure cam be called by pressing Alt and the "Page's
  3137. Procedure number" key. For example, Alt2 calls the Page2
  3138. procedure, Alt3 the Page3 procedure, and so on.
  3139.  
  3140. The default screen has three buttons; Ok, Cancel and
  3141. Next_Page. All three fields are required by the template.
  3142.  
  3143. <Property Fields>
  3144. Property Fields
  3145.  
  3146. <  Insert Message>
  3147. Insert Message
  3148.      Enter a message to use instead of the default stored
  3149.      in Clarion.app for Inserting a record.
  3150.  
  3151. <  Change Message>
  3152. Change Message
  3153.      Enter a message to use instead of the default stored
  3154.      in Clarion.app for Changing a record.
  3155.  
  3156. <  Delete Message>
  3157. Delete Message
  3158.      Enter a message to use instead of the default stored
  3159.      in Clarion.app for Deleting a record.
  3160.  
  3161. <  # Page Procedure>
  3162. # Page Procedure
  3163.      There are eight (8) Prompts for additional pages. They
  3164.      are called in their numerical order, for instance the
  3165.      '2nd Page Procedure' is called when the user presses
  3166.      either the Next_Page button, the Page Down key, or the
  3167.      Alt2 key. Name your additional Page procedure calls
  3168.      in these prompts.  These must be filled in
  3169.      consecutively -- you must not leave any "holes" in the
  3170.      list of "PageOf" procedure calls.
  3171.  
  3172. <  Next Procedure>
  3173. Next Procedure
  3174.      Enter the Procedure to call when the Ok button is
  3175.      pressed, AFTER the file's update has completed without
  3176.      any errors. The Next Procedure call is generated before
  3177.      the code for any Repeated ADDs.
  3178.  
  3179. <  Disable RI Logout>
  3180. Disable RI Logout
  3181.      If multiple CONSTRAINED relations exist between any
  3182.      two files processed by the Referential Integrity code,
  3183.      when this code is processed your program will
  3184.      experience a Clarion Run-Time halt, Cannot Logout
  3185.      Files.  Check the Disable RI Logout Check-Box to
  3186.      stop the RI code from generating.  NOTE:  ANY RI
  3187.      TRANSACTIONS will not be recoverable if an error
  3188.      occurs.
  3189.  
  3190. <Embedded Source>
  3191. Embedded Source
  3192.  
  3193. <  Data Section >
  3194. "Data Section"
  3195.      In the data section of the procedure after local data, the
  3196.      screen and pulldown structures. This may be used to
  3197.      declare any data which you may want to use only in your
  3198.      embedded source code.
  3199.  
  3200. <  Setup Procedure >
  3201. "Setup Procedure"
  3202.      Source code is inserted after the CODE statement.
  3203.  
  3204. <  Setup Screen >
  3205. "Setup Screen"
  3206.      After OPEN(Screen).
  3207.  
  3208. <  Setup Next Procedure >
  3209. "Setup Next Procedure"
  3210.      If a 'Next Procedure' was defined, code is inserted
  3211.      before the procedure is called.
  3212.  
  3213. <  Return from Next Procedure >
  3214. "Return from Next Procedure"
  3215.      If a 'Next Procedure' was defined, code is inserted
  3216.      after the procedure is executed.
  3217.  
  3218. <  Ok Button Press >
  3219. "Ok Button Press"
  3220.      Code is inserted to execute as soon as the "Ok" button is
  3221.      pressed, before going into non-stop mode.
  3222.  
  3223. <  Next Page Button Press >
  3224. "Next Page Button Press"
  3225.      Code is inserted to execute as soon as the "Next_Page"
  3226.      button is pressed, before going accessing the next
  3227.      page.
  3228.  
  3229. <  End of Procedure >
  3230. "End of Procedure"
  3231.      Code placed in this window executes after all other
  3232.      code in the procedure has executed.  This code begins
  3233.      in column one, therefore you may use this window to
  3234.      write any ROUTINEs which are called from any other
  3235.      embedded source code window.
  3236.  
  3237. <  When Screen Field is Selected : >
  3238. "When Screen Field is Selected : "
  3239.      In the CASE SELECTED() structure, executed when the
  3240.      field is selected for entry.
  3241.  
  3242. <  When Screen Field is Completed: >
  3243. "When Screen Field is Completed: "
  3244.      In the CASE FIELD() structure, executed when the field
  3245.      has been completed.
  3246.  
  3247. <Formula Classes>
  3248. Formula Classes
  3249.  
  3250. <  SETUP >
  3251. SETUP
  3252.      A Conditional or Computed Field with "SETUP" in the
  3253.      Formula Class field is calculated once at the beginning
  3254.      of the procedure before the screen field processing
  3255.      LOOP.
  3256.  
  3257. <  RETURN >
  3258. RETURN
  3259.      A Conditional or Computed Field with "RETURN" in the
  3260.      Formula Class field is calculated once just before the
  3261.      return from the procedure when the user selects the
  3262.      'Ok' button.
  3263.  
  3264. <  PRIMEKEY >
  3265. PRIMEKEY
  3266.      A Conditional or Computed Field with "PRIMEKEY" in
  3267.      the Formula Class field is calculated just before the
  3268.      SET(Key,Key) during an Autoincrement ADD. It is
  3269.      inserted again right before the ADD(File) to preserve
  3270.      any components you have primed.
  3271.  
  3272.      This can be used to prime key components to enable
  3273.      subset numbering. For example, it can be used to cause
  3274.      autonumbering of line item numbers on an invoice.  If
  3275.      you have defined a key with the fields InvoiceNumber
  3276.      and LineItemNo, supply the current InvoiceNumber as a
  3277.      PRIMEKEY Formula.  The AutoNumber Routine determines
  3278.      the next available LineItemNo for that invoice.  The
  3279.      record ADDed to the file will already have
  3280.      InvoiceNumber and LineItemNo in the record buffer and
  3281.      on disk.
  3282.  
  3283. <  No class (blank) >
  3284. No class (blank)
  3285.      Calculates the formula every time any field on the
  3286.      screen is completed.  The calculation code is generated
  3287.      before the field setup routines at the top of the
  3288.      processing LOOP.
  3289.  
  3290.  
  3291. <<The PageOf Template>>
  3292. <General Information>
  3293.  
  3294. The "PageOf" procedure template is designed to work
  3295. together with the MultiPage template. PageOf is subordinate
  3296. to MultiPage.  The PageOf procedure has no facility to
  3297. update a record on disk.  All file updates are handled by
  3298. the MultiPage template procedure.
  3299.  
  3300. A PageOf procedure's prototype in the MAP looks like:
  3301.  
  3302.      ProcName(BYTE,*BYTE,BYTE,STRING)
  3303.  
  3304. The parameters passed from the MultiPage procedure are:
  3305.  
  3306.      (Action,Page,Pages,Message)
  3307.  
  3308. The PageOf procedures are expected to use the same data
  3309. file as the MultiPage procedure.  MultiPage passes each
  3310. PageOf procedure the (4) following parameters: the current
  3311. Action (Add / Change / Delete / Check_Required), the current
  3312. Page number, the total number of Pages, and the Message
  3313. describing the current update.
  3314.  
  3315. At runtime the MultiPage procedure tracks which "PageOf"
  3316. procedures have been called. When the user presses 'Ok'
  3317. any "PageOf" procedure which has not yet been accessed by
  3318. the user will be called in order to check for 'Required'
  3319. fields. The PageOf procedure is called and immediately
  3320. placed in nonstop edit mode. If a required field has been
  3321. left blank, the user is notified and placed in edit mode.
  3322.  
  3323. Initial field values from the data dictionary are
  3324. pre-loaded during an ADD.  Range checking is generated from
  3325. the data dictionary definitions and is enforced during ADD
  3326. or CHANGE.  If an out of range condition exists the user is
  3327. notified of the valid range for the field, and the cursor
  3328. is placed on that field for editing.
  3329.  
  3330. The template will generate lookups for accessing secondary
  3331. files where the relationship is defined as MANY:1.  The
  3332. "Must be in File" automatic field validation is enforced
  3333. when the user selects 'OK'.  If the value entered does not
  3334. exist in the specified file the user is notified and is
  3335. placed back on the field.
  3336.  
  3337. If the application is set to SHARE files the MultiPage
  3338. procedure enforces multi-user concurrency checking at the
  3339. record level.
  3340.  
  3341. If Relational Constraints have been defined in the Data
  3342. Dictionary, the code generated from the MultiPage template
  3343. enforces those constraints.
  3344.  
  3345. <Formatter Support>
  3346. Formatter Support
  3347.  
  3348. The default screen contained in CLARION.APP has a local
  3349. variable named LOC:Message placed at the top of the entry
  3350. screen. This variable is used to inform the user of the
  3351. current action: Add, Change, or Delete of the record on the
  3352. screen.  The message displayed is stored in CLARION.APP in
  3353. the global variables GLO:InsertMsg, GLO:ChangeMsg, and
  3354. GLO:DeleteMsg respectively.
  3355.  
  3356. The programmer can enter his own messages on the Procedure
  3357. Properties window. If any Prompt for a message is filled
  3358. in, it will be used instead of the global values stored in
  3359. the default .APP file.
  3360.  
  3361. The default screen also has two local variables for page
  3362. number display; LOC:Page and LOC:Pages. These variables
  3363. are used to display the current page (LOC:Page), and the
  3364. total number of pages (LOC:Pages).
  3365.  
  3366. The PageUp and PageDown keys will access the next or prior
  3367. page procedures.  The CtrlPgUp and CtrlPgDn keys will call
  3368. the first or last page procedures respectively.
  3369.  
  3370. The default screen has four buttons; Base_Page,
  3371. Previous_Page, Next_Page, and Last_Page.  The Next_Page and
  3372. Previous_Page button fields are required by the template,
  3373. Base_Page and Last_Page are optional.  Pressing the
  3374. Base_Page button will return the user to the main page
  3375. (MultiPage template).  The Previous and Next Page buttons
  3376. call the next or previous page procedures.  The Last_Page
  3377. button calls the last page procedure defined on the
  3378. MultiPage procedure property screen.
  3379.  
  3380. If a Pulldown structure has been created by the Pulldown
  3381. Menu Formatter, it is generated after the screen structure.
  3382. The Pulldown is OPENed after the screen structure, and is
  3383. closed upon exit from the procedure.
  3384.  
  3385. The Report Formatter is not supported.
  3386.  
  3387. <Property Fields>
  3388. Property Fields
  3389.  
  3390. The "PageOf" Procedure Properties window has no
  3391. specialized prompts.
  3392.  
  3393. <Embedded Source>
  3394. Embedded Source
  3395.  
  3396. <  Data Section >
  3397. "Data Section"
  3398.      In the data section of the procedure after local data, the
  3399.      screen and pulldown structures. This may be used to
  3400.      declare any data which you may want to use only in
  3401.      your embedded source code.
  3402.  
  3403. <  Setup Procedure >
  3404. "Setup Procedure"
  3405.      Source code is inserted after the CODE statement.
  3406.  
  3407. <  Setup Screen >
  3408. "Setup Screen"
  3409.  
  3410. <  Base_Page Button Press >
  3411. "Base_Page Button Press"
  3412.      Code is inserted to execute as soon as the "Base Page"
  3413.      button is pressed, before going into non-stop mode and
  3414.      returning to the main (MultiPage) procedure.
  3415.  
  3416. <  Previous_Page Button Press >
  3417. "Previous_Page Button Press"
  3418.      Code is inserted to execute as soon as the "Previous
  3419.      Page" button is pressed, before going into non-stop
  3420.      mode and returning to the prior page procedure.
  3421.  
  3422. <  Next_Page Button Press >
  3423. "Next_Page Button Press"
  3424.      Code is inserted to execute as soon as the "Next_Page" button
  3425.      is pressed, before going into non-stop mode and returning to
  3426.      the next page procedure.  If Next_Page is pressed on the last
  3427.      page, the user is placed on the first page (MultiPage)
  3428.      procedure.
  3429.  
  3430. <  Last_Page Button Press >
  3431. "Last_Page Button Press"
  3432.      Code is inserted to execute as soon as the "Last Page" button
  3433.      is pressed, before going into non-stop mode and calling the
  3434.      last page procedure.
  3435.  
  3436. <  End of Procedure >
  3437. "End of Procedure"
  3438.      Code placed in this window executes after all other code in
  3439.      the procedure has executed.  This code begins in column one,
  3440.      therefore you may use this window to write any ROUTINEs which
  3441.      are called from any other embedded source code window.
  3442.  
  3443. <  When Screen Field is Selected : >
  3444. "When Screen Field is Selected : "
  3445.      In the CASE SELECTED() structure, executed when the field is
  3446.      selected for entry.
  3447.  
  3448. <  When Screen Field is Completed: >
  3449. "When Screen Field is Completed: "
  3450.      In the CASE FIELD() structure, executed when the field has
  3451.      been completed.
  3452.  
  3453. <Formula Classes>
  3454. Formula Classes
  3455.  
  3456. <  SETUP >
  3457. SETUP
  3458.      A Conditional or Computed Field with "SETUP" in the Formula
  3459.      Class field is calculated once at the beginning of the
  3460.      procedure before the screen field processing LOOP.
  3461.  
  3462. <  No class (blank) >
  3463. No class (blank)
  3464.      Calculates the formula every time any field on the screen is
  3465.      completed.  The calculation code is generated before the
  3466.      field setup routines at the top of the processing LOOP.
  3467.  
  3468. <<The Print Template>>
  3469. <General Information>
  3470.  
  3471. The "Print" template generates a procedure that prints the
  3472. report created with the Report Formatter.  This template makes
  3473. no provision for accessing data files.  Fields printed on the
  3474. report reflect their value in memory at the time the procedure
  3475. is executed.  The "Print" template is intended for printing
  3476. messages or status reports.
  3477.  
  3478. <Formatter Support>
  3479. Formatter Support
  3480.  
  3481. The "Print" procedure in CLARION.APP is pre-loaded with an empty
  3482. report layout.  Local data is generated before the report
  3483. structure.  Formulas are generated before the OPEN(Report)
  3484. statement.  The Screen and Pulldown Menu Formatters are not
  3485. supported.
  3486.  
  3487. <Property Fields>
  3488. Property Fields
  3489.  
  3490. <  Redirect Procedure: >
  3491. Redirect Procedure:
  3492.      Enter the name of a procedure which is called before the
  3493.      report is generated to allow the user to define the report's
  3494.      destination at runtime.  The Print Template assumes that the
  3495.      report's destination is in GLO:FileSpec (a global variable
  3496.      defined in CLARION.APP) after the Redirect Procedure is
  3497.      called.  Normally, the Redirect Procedure is created from the
  3498.      Redirect Template.
  3499.  
  3500. <  View Procedure: >
  3501. View Procedure:
  3502.      Enter the name of a procedure which is called after the
  3503.      report is generated to allow the user to view the report's
  3504.      output (if the user selected the SCREEN or a FILE as the
  3505.      report's destination).  Normally, the View Procedure is
  3506.      created from the View Template.  The View Template assumes
  3507.      that the report's output filename is in GLO:FileSpec (a
  3508.      global variable defined in CLARION.APP).  If the user
  3509.      selected a printer port, the Print Template clears
  3510.      GLO:FileSpec, which disables the View Procedure.
  3511.  
  3512. <Embedded Source Code>
  3513. Embedded Source Code
  3514.  
  3515. <  Data Section >
  3516. "Data Section"
  3517.      In the data section of the procedure after local data, the
  3518.      screen and pulldown structures.  This may be used to declare
  3519.      any data which you may want to use only in your embedded
  3520.      source code.
  3521.  
  3522. <  Setup Procedure >
  3523. "Setup Procedure"
  3524.      After the CODE statement.
  3525.  
  3526. <  After Report OPEN before Formulas >
  3527. "After Report OPEN before Formulas"
  3528.      After the report has been opened, and before any the Formula
  3529.      fields are calculated and before anything is printed.
  3530.  
  3531. <  After Formulas Before Title Page >
  3532. "After Formulas Before Title Page"
  3533.      After the formulas are calculated, and before anything is
  3534.      printed.
  3535.  
  3536. <  After Grand Totals Before Final Page >
  3537. "After Grand Totals Before Final Page"
  3538.      After the Title Page and Body Detail have printed, but before
  3539.      the Final Page.
  3540.  
  3541. <  After Final Page Before Close >
  3542. "After Final Page Before Close"
  3543.      After the Final Page has printed, but before the Report is
  3544.      closed.
  3545.  
  3546. <  End of Procedure >
  3547. "End of Procedure"
  3548.      Code placed in this window executes after all other code in
  3549.      the procedure has executed.  This code begins in column one,
  3550.      therefore you may use this window to write any ROUTINEs which
  3551.      are called from any other embedded source code window.
  3552.  
  3553. <  Detail Pre-Print Code for: >
  3554. "Detail Pre-Print Code for:"
  3555.      This is an implicit embedded source code window which is
  3556.      executed immediately before the Body detail band is printed.
  3557.      There is only one implicit Detail Pre-Print embedded source
  3558.      code window in the report.
  3559.  
  3560. <  Detail Post-Print Code for: >
  3561. "Detail Post-Print Code for:"
  3562.      This is an implicit embedded source code window which is
  3563.      executed immediately after the Body detail band is printed.
  3564.      There is only one implicit Detail Post-Print embedded source
  3565.      code window in the report.
  3566.  
  3567. <Formula Classes>
  3568. Formula Classes
  3569.  
  3570. No formula classes are supported by this procedure Template.
  3571. All Formulas are generated once without regard to any value in
  3572. the Formula Class field.
  3573.  
  3574.  
  3575. <<The Pulldown Template>>
  3576. <General Information>
  3577.  
  3578. The "Pulldown" template generates a procedure that displays a
  3579. pulldown menu used to execute other procedures.  Menu items are
  3580. placed in the menu with the Pulldown Menu Formatter.
  3581.  
  3582. Once in the Pulldown Menu Formatter, the menu selections which
  3583. execute procedures must have the "Execute procedure" radio
  3584. button selected and the procedure to call must be entered.
  3585. Optionally, source code may be entered instead of a procedure
  3586. name by deleting any procedure name and selecting the "Source"
  3587. pushbutton.  At least one menu item should have an edit
  3588. procedure of "RETURN" to exit the "Pulldown" procedure.
  3589.  
  3590. The code generated by the "Pulldown" procedure template operates
  3591. like code generated from the "Menu" procedure template.
  3592. Therefore, the template disables all the fields in any screen
  3593. that is active and closes the pulldown menu while its selected
  3594. procedures are executing.
  3595.  
  3596. A pulldown menu that is designed to work with a screen must be
  3597. created by the Pulldown Menu Formatter in the procedure that
  3598. contains the screen.
  3599.  
  3600. <Formatter Support>
  3601. Formatter Support
  3602.  
  3603. The "Pulldown" procedure in CLARION.APP is pre-loaded with an
  3604. empty pulldown menu.  Local data is generated before the
  3605. pulldown menu structure.  At least one menu item must contain a
  3606. menu procedure of "RETURN" to exit the pulldown procedure.
  3607. Formulas are generated at the top of the keyboard loop before
  3608. the menu item edit routines.  The Screen and Report Formatters
  3609. are not supported.
  3610.  
  3611. <Property Fields>
  3612. Property Fields
  3613.  
  3614. <  Sticky Menus >
  3615. [√] Sticky Menus
  3616.      Check this box to generate code that re-selects the last menu
  3617.      item the user selected upon return from the called procedure.
  3618.  
  3619. <  Keep Pulldown Active >
  3620. [√] Keep Pulldown Active
  3621.      Check this box to keep the Pulldown structure active
  3622.      during the execution of a Pulldown option.
  3623.  
  3624. <Embedded Source>
  3625. Embedded Source
  3626.  
  3627. <  Data Section >
  3628. "Data Section"
  3629.      In the data section of the procedure after local data, the
  3630.      screen and pulldown structures.  This may be used to declare
  3631.      any data which you may want to use only in your embedded
  3632.      source code.
  3633.  
  3634. <  Setup Procedure >
  3635. "Setup Procedure"
  3636.      After the CODE statement.
  3637.  
  3638. <  Setup Pulldown >
  3639. "Setup Pulldown"
  3640.      After OPEN(Pulldown).
  3641.  
  3642. <  Top of Accept Loop>
  3643. "Top of Accept Loop"
  3644.       At the top of the screen field processing loop.
  3645.  
  3646. <  End of Procedure >
  3647. "End of Procedure"
  3648.      Code placed in this window executes after all other code in
  3649.      the procedure has executed.  This code begins in column one,
  3650.      therefore you may use this window to write any ROUTINEs which
  3651.      are called from any other embedded source code window.
  3652.  
  3653. <  Pulldown Item Code for : >
  3654. Pulldown Item Code for :
  3655.      In the CASE FIELD() structure, executed when the menu item is
  3656.      selected by the user.
  3657.  
  3658. <Formula Classes>
  3659. Formula Classes
  3660.  
  3661. No formula classes are supported by this procedure Template.
  3662.  
  3663.  
  3664. <<The Redirect Template>>
  3665. <General Information>
  3666.  
  3667. The "Redirect" template creates a procedure which allows the
  3668. user to choose a report's destination at runtime.  The Template
  3669. code itself is very basic -- all the functionality is provided
  3670. in the default procedure in CLARION.APP.
  3671.  
  3672. There are two local variables declared which are placed on the
  3673. default screen design.  One selects the destination and the
  3674. other names the disk file if FILE is the selected destination.
  3675. The functionality of the procedure is completely contained in
  3676. the embedded source code windows for these two fields and the Ok
  3677. and Cancel buttons.
  3678.  
  3679. Once the destination is selected, it is placed in the
  3680. GLO:FileSpec global variable (as expected by the Report and View
  3681. Templates).
  3682.  
  3683. <Formatter Support>
  3684. Formatter Support
  3685.  
  3686. The "Redirect" procedure in CLARION.APP is pre-loaded with a
  3687. default screen design which allows the user to select any LPT or
  3688. COM port, the SCREEN, or to name a disk file to receive report
  3689. output.
  3690.  
  3691. The Report and Pulldown Menu Formatters are not supported.
  3692. Formulas are also not supported.
  3693.  
  3694. <Property Fields>
  3695. Property Fields
  3696.  
  3697. There are no prompts which are specific to this procedure.
  3698.  
  3699. <Embedded Source>
  3700. Embedded Source
  3701.  
  3702. <  Data Section >
  3703. "Data Section"
  3704.      In the data section of the procedure, after local data and
  3705.      the screen structure.  This may be used to declare any data
  3706.      which you may want to use only in your embedded source code.
  3707.  
  3708. <  Setup Procedure >
  3709. "Setup Procedure"
  3710.      Immediately after the CODE statement.
  3711.  
  3712. <  Setup Screen >
  3713. "Setup Screen"
  3714.      Immediately after the OPEN(Screen) statement.
  3715.  
  3716. <  Top of Accept Loop>
  3717. "Top of Accept Loop"
  3718.       At the top of the screen field processing loop.
  3719.  
  3720. <  End of Procedure >
  3721. "End of Procedure"
  3722.      Code placed in this window executes after all other code in
  3723.      the procedure has executed.  This code begins in column one,
  3724.      therefore you may use this window to write any ROUTINEs which
  3725.      are called from any other embedded source code window.
  3726.  
  3727. <  When Screen Field is Selected : >
  3728. "When Screen Field is Selected : "
  3729.      In the CASE SELECTED() structure, executed when the field is
  3730.      selected for entry.
  3731.  
  3732. <  When Screen Field is Completed: >
  3733. "When Screen Field is Completed: "
  3734.      In the CASE FIELD() structure, executed when the field has
  3735.      been completed.
  3736.  
  3737. <Formula Classes>
  3738. Formula Classes
  3739.  
  3740. Neither Formulas nor Formula Classes are supported by the
  3741. Redirect Template.
  3742.  
  3743.  
  3744. <<The Report Template>>
  3745. <General Information>
  3746.  
  3747. The "Report" template prints reports from one or multiple
  3748. related data files.  File relationships, both 1:MANY and MANY:1,
  3749. are automatically handled with some restrictions.  The files
  3750. used for the report are defined in the File Schematic built in
  3751. the File Schematic Definition window.  The first file in the
  3752. File Schematic is the Primary file, all others are Secondary
  3753. files.  A Secondary Child file (double right arrow) has a 1:MANY
  3754. relationship with the file to which it is attached in the File
  3755. Schematic.  A Secondary Lookup file (single right arrow) has a
  3756. MANY:1 relationship with the file to which it is attached in the
  3757. File Schematic.
  3758.  
  3759. The template recurses through as many levels of 1:MANY
  3760. relationships as are defined in the File Schematic, starting
  3761. with the Primary file, going down the chain of Secondary files
  3762. beginning with the first Child file of the Primary.  This
  3763. generates a set of nested LOOP structures which read all related
  3764. records from each file in turn.  The Body detail band is printed
  3765. every time a record from the lowest level Child file is read. A
  3766. second Child file of the Primary file would begin a second
  3767. 1:MANY file chain -- this is not supported by this template.
  3768.  
  3769. The Secondary Lookup (MANY:1) relationship is supported for
  3770. multiple levels below the file (Primary or Secondary Child) to
  3771. which it is related -- a lookup will generate a second lookup
  3772. from it.
  3773.  
  3774. This File Schematic is directly supported:
  3775.  
  3776.    Primary
  3777.     └──> Secondary (Lookup from Primary)
  3778.     │  └──> Secondary (Lookup from Lookup)
  3779.     └──> Secondary (Lookup from Primary)
  3780.     └─>> Secondary (Child of Primary)
  3781.        └──> Secondary (Lookup from Secondary Child)
  3782.        │  └──> Secondary (Lookup from Lookup)
  3783.        └──> Secondary (Lookup from Secondary Child)
  3784.        └─>>Secondary (Child of Secondary Child)
  3785.           └──> Secondary (Lookup from Secondary Child)
  3786.  
  3787. This File Schematic is NOT directly supported:
  3788.  
  3789.    Primary
  3790.     └──> Secondary (Lookup from Primary)
  3791.     │  └─>>Secondary (Child of Lookup) -- NO Children of Lookups
  3792.     └─>>Secondary (Child of Primary)
  3793.     │  └──> Secondary (Lookup from Secondary Child)
  3794.     └─>>Secondary (Child of Primary) -- NO 2nd Child chains
  3795.  
  3796. This template supports multiple Group Breaks per Primary or
  3797. Secondary Child file.  The code to print the group break is
  3798. generated as a ROUTINE called from within the nested LOOP
  3799. structure after a record is read from the file for which the
  3800. group break is defined.
  3801.  
  3802. Record filters are supported on the Primary and every Secondary
  3803. Child file (see the Formula Class topic below).  Multi-Up labels
  3804. are supported -- they must be defined in the Body Detail band.
  3805.  
  3806. <Formatter Support>
  3807. Formatter Support
  3808.  
  3809. The "Report" procedure in CLARION.APP is pre-loaded with an
  3810. empty report layout.  Line counter, Page counter, and Report
  3811. Device variables are defined in local data, and the Report
  3812. Properties window uses these local variables (the line counter
  3813. is required by the template).  'GENERIC PRINTER' is the default
  3814. printer selected from the PRINTER.CTL file.
  3815.  
  3816. If you place anything in the Title Page band and intend that it
  3817. should print without first printing the Page Header (or Footer),
  3818. you must check the ALONE attribute in the Title Page's Band
  3819. Properties window.
  3820.  
  3821. The Screen Formatter contains a default screen which is included
  3822. in the generated source code only if the Show Report Progress
  3823. box is checked.  The screen contains display-only fields for the
  3824. Line Counter and Page Counter.  The values in these two fields
  3825. are displayed after each PRINT statement in the Report.
  3826.  
  3827. The Pulldown Menu Formatter is not supported by the Report
  3828. Template.
  3829.  
  3830. <Property Fields>
  3831. Property Fields
  3832.  
  3833. <  Enable ESC Key Abort: >
  3834. Enable ESC Key Abort:
  3835.      Check this box to include code to allow the user to abort the
  3836.      report at runtime by pressing the ESC key.
  3837.  
  3838. <  Show Report Progress: >
  3839. Show Report Progress:
  3840.      Check this box to display the screen defined in the Screen
  3841.      Formatter as the report is being generated.  This allows the
  3842.      user to clearly see that the report is being generated
  3843.      (especially if it is directed to a disk file).
  3844.  
  3845. <  CLEAR Record First: >
  3846. CLEAR Record First:
  3847.      Check this box to issue a CLEAR statement for the Primary
  3848.      file before the SET statement which initiates sequential
  3849.      processing.  This allows you to choose between initializing
  3850.      key fields in the Report procedure, or calling the Report
  3851.      from another procedure which allows the user to select or
  3852.      input the correct key field starting values.
  3853.  
  3854. <  Primary File Access: >
  3855. Primary File Access:
  3856.      Select the radio button which defines the type of access you
  3857.      want to the Primary file.  If you select Keyed Order, the
  3858.      Primary file's Access Key set on the Field Selection window
  3859.      is used to access the file and a Range Limit Field may be
  3860.      specified.  If you select Record Order, the Primary file is
  3861.      accessed in physical, record-number, order and any Range
  3862.      Limit Field is ignored.
  3863.  
  3864. <  Range Limit Field: >
  3865. Range Limit Field:
  3866.      The records to be printed from the Primary file can be
  3867.      limited by fixing the value of a component of the Primary
  3868.      file access key.  Only those records whose key component
  3869.      value is equal to the value in the Range Value Field will be
  3870.      printed.  You must select a key component field of the
  3871.      Primary file's access key you defined in the File Schematic.
  3872.  
  3873. <  Range Value Field: >
  3874. Range Value Field:
  3875.      Select the field which, at run-time, will contain the value
  3876.      to which you want the report's Primary file to be limited.
  3877.      The value in this field will be assigned to the key component
  3878.      field you specified in the Range Limit Field before the SET
  3879.      statement for the Primary file.
  3880.  
  3881. <  Redirect Procedure: >
  3882. Redirect Procedure:
  3883.      Enter the name of a procedure which is called before the
  3884.      report is generated to allow the user to define the report's
  3885.      destination at runtime.  The Report Template assumes that the
  3886.      report's destination is in GLO:FileSpec (a global variable
  3887.      defined in CLARION.APP) after the Redirect Procedure is
  3888.      called.  Normally, the Redirect Procedure is created from the
  3889.      Redirect Template.
  3890.  
  3891. <  View Procedure: >
  3892. View Procedure:
  3893.      Enter the name of a procedure which is called after the
  3894.      report is generated to allow the user to view the report's
  3895.      output (if the user selected the SCREEN or a FILE as the
  3896.      report's destination).  Normally, the View Procedure is
  3897.      created from the View Template.  The View Template assumes
  3898.      that the report's output filename is in GLO:FileSpec (a
  3899.      global variable defined in CLARION.APP).  If the user
  3900.      selected a printer port, the Report Template clears
  3901.      GLO:FileSpec, which disables the View Procedure.
  3902.  
  3903. <Embedded Source>
  3904. Embedded Source
  3905.  
  3906. <  Data Section >
  3907. "Data Section"
  3908.      In the data section of the procedure, after local data and
  3909.      the report structure.  This may be used to declare any data
  3910.      which you may want to use only in your embedded source code.
  3911.  
  3912. <  Setup Procedure >
  3913. "Setup Procedure"
  3914.      Immediately after the CODE statement.
  3915.  
  3916. <  After Report OPEN before Title Page >
  3917. "After Report OPEN before Title Page"
  3918.      After all files in the report are opened and the report is
  3919.      opened, but before anything is printed.
  3920.  
  3921. <  Immediately before SET(key,key) >
  3922. "Immediately before SET(key,key)"
  3923.      Immediately after the Range Value field has been assigned to
  3924.      the Range Limit field and before the SET statement which
  3925.      establishes the report's starting position in the file.  This
  3926.      allows you to correctly initialize any other fields in the
  3927.      Primary File Access Key before the SET statement.  If Range
  3928.      Limit and Range Value fields are not specified, no source
  3929.      code is generated from this Embedded Source window.
  3930.  
  3931. <  Before Primary LOOP after SET >
  3932. "Before Primary LOOP after SET"
  3933.      After the SET statement which sets up the order and starting
  3934.      point on the Primary file, but before the LOOP which
  3935.      processes the Primary file records.
  3936.  
  3937. <  Top of Primary LOOP >
  3938. "Top of Primary LOOP"
  3939.      Immediately after the LOOP statement which processes the
  3940.      Primary file and before any other statement in the LOOP. Code
  3941.      placed here will execute every time through the LOOP.
  3942.  
  3943. <  In Primary LOOP immediately after NEXT >
  3944. "In Primary LOOP immediately after NEXT"
  3945.      Code placed in this window executes immediately after each
  3946.      Primary file record is read and before any group break code
  3947.      is executed.  If you code your own record filter at this
  3948.      point instead of using a Pre:FILTER class Formula, it would
  3949.      be a good idea to check ERRORCODE() to detect the end of file
  3950.      condition (if you don't, you could create an infinite loop).
  3951.  
  3952. <  In Primary LOOP after NEXT before Lookups >
  3953. "In Primary LOOP after NEXT before Lookups"
  3954.      Code placed in this window executes after each Primary file
  3955.      record is read and any group break code is executed, but
  3956.      before any Record Filter, Lookups, or Formulas.
  3957.  
  3958. <  In Primary LOOP after Lookups >
  3959. "In Primary LOOP after Lookups"
  3960.      Code placed in this window executes after any Record Filter,
  3961.      Lookups, or Formulas from the Primary file, but before any
  3962.      related Child records are accessed.
  3963.  
  3964. <  After Primary LOOP before Grand Totals and Final Page >
  3965. "After Primary LOOP before Grand Totals and Final Page"
  3966.      Code placed in this window executes after all records from
  3967.      all files have been processed, but before the Grand Totals
  3968.      and Final Page bands are printed.
  3969.  
  3970. <  End of Procedure >
  3971. "End of Procedure"
  3972.      Code placed in this window executes after all other code in
  3973.      the procedure has executed.  At this point, the Report is
  3974.      closed.  This code begins in column one, therefore you may
  3975.      use this window to write any ROUTINEs which are called from
  3976.      any other embedded source code window.
  3977.  
  3978. <  When Screen Field is Selected : >
  3979. "When Screen Field is Selected : "
  3980.      The Report Template does not support screen processing during
  3981.      generation of the report.  Code placed here is not generated.
  3982.  
  3983. <  When Screen Field is Completed: >
  3984. "When Screen Field is Completed: "
  3985.      The Report Template does not support screen processing during
  3986.      generation of the report.  Code placed here is not generated.
  3987.  
  3988. <  Group Header Pre-Print Code for: >
  3989. "Group Header Pre-Print Code for:"
  3990.      This is an implicit embedded source code window which is
  3991.      executed immediately before the header for the group break
  3992.      referenced is printed.  There is one implicit Group Header
  3993.      Pre-Print embedded source code window for each group break
  3994.      defined in the Report Formatter.
  3995.  
  3996. <  Group Header Post-Print Code for: >
  3997. "Group Header Post-Print Code for:"
  3998.      This is an implicit embedded source code window which is
  3999.      executed immediately after the header for the group break
  4000.      referenced is printed.  There is one implicit Group Header
  4001.      Post-Print embedded source code window for each group break
  4002.      defined in the Report Formatter.
  4003.  
  4004. <  Group Footer Pre-Print Code for: >
  4005. "Group Footer Pre-Print Code for:"
  4006.      This is an implicit embedded source code window which is
  4007.      executed immediately before the footer for the group break
  4008.      referenced is printed.  There is one implicit Group Footer
  4009.      Pre-Print embedded source code window for each group break
  4010.      defined in the Report Formatter.
  4011.  
  4012. <  Group Footer Post-Print Code for: >
  4013. "Group Footer Post-Print Code for:"
  4014.      This is an implicit embedded source code window which is
  4015.      executed immediately after the footer for the group break
  4016.      referenced is printed.  There is one implicit Group Footer
  4017.      Post-Print embedded source code window for each group break
  4018.      defined in the Report Formatter.
  4019.  
  4020. <  Detail Pre-Print Code for: >
  4021. "Detail Pre-Print Code for:"
  4022.      This is an implicit embedded source code window which is
  4023.      executed immediately before the Body detail band is printed.
  4024.      There is only one implicit Detail Pre-Print embedded source
  4025.      code window in the report.
  4026.  
  4027. <  Detail Post-Print Code for: >
  4028. "Detail Post-Print Code for:"
  4029.      This is an implicit embedded source code window which is
  4030.      executed immediately after the Body detail band is printed.
  4031.      There is only one implicit Detail Post-Print embedded source
  4032.      code window in the report.
  4033.  
  4034. <Formula Classes>
  4035. Formula Classes
  4036.  
  4037. <  SETUP>
  4038. SETUP
  4039.      A Conditional or Computed Field with "SETUP" in the Formula
  4040.      Class field is calculated once at the beginning of the
  4041.      procedure, immediately after the "After Report OPEN before
  4042.      Title Page" embedded source point.
  4043.  
  4044. <  Pre:FILTER>
  4045. Pre:FILTER
  4046.      The prefix of the Primary or a Secondary Child file (not a
  4047.      Lookup file) with :FILTER appended (Pre:FILTER): This creates
  4048.      a record filter to skip over records in which the filter
  4049.      expression does not evaluate as true, just after the file's
  4050.      record is read.  Only the Formula expression (in a Computed
  4051.      Field), or the Condition expression (in a Conditional Field)
  4052.      is used to generate the filter expression. No other
  4053.      information from the Formula field is used in the filter (any
  4054.      If True or If False expressions are ignored and the Field
  4055.      Name is not used -- this may be a "dummy" field).
  4056.  
  4057. <  FileName>
  4058. FileName
  4059.      The name of the Primary or a Secondary Child file (not a
  4060.      Lookup file) in the File Schematic.  This calculates the
  4061.      formula only when a record read from the named file -- this
  4062.      comes after any Pre:FILTER expression on the file is
  4063.      evaluated and any Lookup records are read.
  4064.  
  4065. <  BreakField>
  4066. BreakField
  4067.      The name of a Group Break field (including prefix).  This
  4068.      calculates the formula just before the Group Footer is
  4069.      printed.  This is useful for formulas calculating expressions
  4070.      which include one or more Report Total fields.  The formula's
  4071.      destination variable should be placed in the group footer.
  4072.  
  4073. <  No class (blank) >
  4074. No class (blank)
  4075.      Calculates the formula every time a record is read from any
  4076.      file.
  4077.  
  4078.  
  4079. <<The Screen Template>>
  4080. <General Information>
  4081.  
  4082. The "Screen" template generates a procedure that processes a
  4083. screen created with the Screen Formatter.  The template
  4084. generates code for Range checks and enforces 'Must be in File'
  4085. from the dictionary.  The "Screen" template is intended for
  4086. displaying status windows or updating memory variables.
  4087.  
  4088. <Formatter Support>
  4089. Formatter Support
  4090.  
  4091. The "Screen" procedure in CLARION.APP is pre-loaded with an
  4092. empty screen layout.  Local data is generated before the screen
  4093. structure.  If a pulldown structure has been created by the
  4094. Pulldown Menu Formatter, it is generated after the screen
  4095. structure.  The template makes no provision for opening or
  4096. closing a pulldown menu.  Such statements must be entered as
  4097. embedded source.  Statements from the Formula Formatter are
  4098. generated at the top of the keyboard loop before the field setup
  4099. routines.  The Report Formatter is not supported.
  4100.  
  4101. <Embedded Source>
  4102. Embedded Source
  4103.  
  4104. <  Data Section >
  4105. "Data Section"
  4106.      In the data section of the procedure, after local data and
  4107.      the report structure.  This may be used to declare any data
  4108.      which you may want to use only in your embedded source code.
  4109.  
  4110. <  Setup Procedure >
  4111. "Setup Procedure"
  4112.      After the CODE statement.
  4113.  
  4114. <  Setup Screen >
  4115. "Setup Screen"
  4116.      After OPEN(Screen).
  4117.  
  4118. <  Top of Accept Loop>
  4119. "Top of Accept Loop"
  4120.       At the top of the screen field processing loop.
  4121.  
  4122. <  End of Procedure >
  4123. "End of Procedure"
  4124.      Code placed in this window executes after all other code in
  4125.      the procedure has executed.  At this point, the Report is
  4126.      closed.  This code begins in column one, therefore you may
  4127.      use this window to write any ROUTINEs which are called from
  4128.      any other embedded source code window.
  4129.  
  4130. <  When Screen Field is Selected : >
  4131. "When Screen Field is Selected : "
  4132.      In the CASE SELECTED() structure, executed when the field is
  4133.      selected for entry.
  4134.  
  4135. <  When Screen Field is Completed: >
  4136. "When Screen Field is Completed: "
  4137.      In the CASE FIELD() structure, executed when the field has
  4138.      been completed.
  4139.  
  4140. <Formula Classes>
  4141.  Formula Classes
  4142.  
  4143. No formula classes are supported by this procedure Template. All
  4144. formulas are generated within the main LOOP before the ACCEPT
  4145. statement.
  4146.  
  4147.  
  4148. <<The Select Template>>
  4149. <General Information>
  4150.  
  4151. The "Select" template generates a procedure that allows a user
  4152. to select a record from a scrolling list of records. Once the
  4153. record is selected it is loaded into memory.  You may then call
  4154. another procedure to take an action on the selected record.  For
  4155. example a print procedure may be called which prints the current
  4156. record from memory.
  4157.  
  4158. The Select template is a modified Browse template procedure to
  4159. allow a user to either select a record, or cancel the selection.
  4160. Upon selection of the Cancel button, the record buffer is
  4161. cleared.  This gives the programmer the ability to check for a
  4162. blank record.  In the print example, the programmer may select
  4163. to not print if the record is blank.
  4164.  
  4165. A set of display-only fields can be designated as "hot fields"
  4166. on screen.  Hot fields display values from the record currently
  4167. highlighted by the selector bar and change whenever the selector
  4168. bar moves.  This allows display of more information from the
  4169. highlighted record than just the one line in the List box.
  4170. These hot fields MUST appear consecutively in the Field List but
  4171. may be placed anywhere on screen.
  4172.  
  4173. An optional locator field finds a specific record in the file.
  4174. Typing any character while the LIST field is active selects the
  4175. locator field.  Completing the locator field with a TAB key or
  4176. mouse CLICK displays the closest matching record at the top of
  4177. the list box.  Another option is an "incremental locator", which
  4178. allows a half-second pause for user entry into a locator field,
  4179. and then automatically finds the closest matching record to the
  4180. contents in the locator field.  The backspace key is active
  4181. during this process.  For numeric data types, it is recommended
  4182. to use a string picture type (for display purposes).  Date
  4183. fields are not recommended for incremental locators.
  4184.  
  4185. See the Browse template help for full details on the specific
  4186. operation of the scrolling listbox and the pushbuttons.
  4187.  
  4188. <Formatter Support>
  4189. Formatter Support
  4190.  
  4191. The "Select" template in CLARION.APP is pre-loaded with a screen
  4192. layout containing a list box and pushbuttons named "Insert",
  4193. "Change", "Delete", "Select" and "Cancel".  The field equate
  4194. label of the list box MUST be "?List" and the "Immediate"
  4195. attribute MUST be on turned on.  The horizontal scroll bar can
  4196. be turned off if the required information fits in the list box.
  4197. The vertical scroll bar is ignored by the template.  The list
  4198. box may not have an edit procedure.  All other properties of the
  4199. list box can be changed.
  4200.  
  4201. Fields from related files may be scrolled in the listbox as
  4202. "lookups" will be done automatically from the Primary file in
  4203. the file schematic.
  4204.  
  4205. The "Insert", "Change", and "Delete" pushbuttons call an update
  4206. procedure to process the selected record (update procedures are
  4207. normally created with a "Form" or "MultiPage" template).  The
  4208. name of the procedure must be entered as the "Update Procedure"
  4209. property.  If there is no update procedure, these pushbuttons
  4210. can be deleted.  If all three pushbuttons are deleted and you
  4211. have named an update procedure, the INSERT, ENTER and DELETE
  4212. keys will Insert, Change, and Delete records while the list box
  4213. is selected.  However, if only one or two of these buttons have
  4214. been removed, the function of that button (Insert, Change, or
  4215. Delete) will be removed from the list box as well and no update
  4216. procedure will be called for that function.
  4217.  
  4218. The "Select" and "Cancel" pushbuttons should not be deleted.
  4219.  
  4220. Local data is generated before the screen structure. If a
  4221. pulldown structure has been created by the Pulldown Menu
  4222. Formatter, it is generated after the screen structure.  The
  4223. template makes no provision for opening or closing a pulldown
  4224. menu.  Such statements must be entered as embedded source.
  4225.  
  4226. The Report Formatter is not supported.
  4227.  
  4228. <Property Fields>
  4229. Property Fields
  4230.  
  4231. <  Range Limit Field: >
  4232. Range Limit Field:
  4233.      The range of records to be displayed can be limited by fixing
  4234.      the value of a component of the primary file access key.  For
  4235.      example, line items on an invoice can be limited to a single
  4236.      invoice.  The key for the item file might contain ITM:Invoice
  4237.      and ITM:Line containing the invoice number and line number of
  4238.      the item.
  4239.  
  4240.      ITM:Invoice would be the Range Limit Field, displaying only
  4241.      those records for a fixed invoice number.
  4242.  
  4243. <  Range Value Field: >
  4244. Range Value Field:
  4245.      The Range Value Field is the field which holds the value to
  4246.      be used as the limiting key component value.  The key
  4247.      component will be assigned this value.
  4248.  
  4249.      In this example, the current Invoice record might contain the
  4250.      number of the invoice that is being displayed.  INV:Number
  4251.      would be the Range Value Field, supplying the value for the
  4252.      Range Limit Field.  The Range Value Field must not be the
  4253.      same field as the Range Limit Field.
  4254.  
  4255. <  Record Filter:>
  4256. Record Filter:
  4257.      There are 2 ways to enter a record filter:
  4258.  
  4259.      The formula generator can be used with a formula class of
  4260.      'FILTER' to validate the expression as entered.
  4261.  
  4262.      Enter a free-form record filter expression in this field.  No
  4263.      validation is done on the code you enter -- an invalid
  4264.      expression will generate compiler errors.  If you are not
  4265.      familiar with the Clarion language statements or expressions,
  4266.      do not use this entry -- use a Formula field with the FILTER
  4267.      Formula Class instead.
  4268.  
  4269. <  Locator Field: >
  4270. Locator Field:
  4271.      A locator field is a screen entry field that updates a
  4272.      component of the primary file access key.  When a locator
  4273.      field is entered, the closest matching record is displayed in
  4274.      the list box.
  4275.  
  4276.      For example, scrolling a vendor file in vendor name sequence
  4277.      uses a key that contains the vendor name field (e.g.
  4278.      VND:Name).  To create a vendor name locator field, place a
  4279.      VND:Name entry field on the screen below the list box and
  4280.      enter VND:Name for the Locator Field.
  4281.  
  4282.      Once the user types a character on the keyboard, the locator
  4283.      field is selected and allows entry for the match.  Pressing
  4284.      the Tab key positions the point bar to the closest match.
  4285.      Another option is "Incremental Locator".  This template
  4286.      option allows one-half second for the user to type a new
  4287.      letter into the locator field.  At each pause longer than
  4288.      one-half second, the field contents are used to locate the
  4289.      closest match (the Tab key does not need to be pressed).  The
  4290.      backspace key is active during this process.
  4291.  
  4292. <  Incremental Locator  >
  4293. [√] Incremental Locator
  4294.      Check this box to indicate that the Locator Field will act as
  4295.      an incremental locator.
  4296.  
  4297. <  Update Procedure: >
  4298. Update Procedure:
  4299.      Enter the name of the update procedure to be used to insert,
  4300.      change, or delete records.  If no update procedure is
  4301.      entered, the "Insert", "Change", and "Delete" pushbuttons
  4302.      should be removed from the screen layout.
  4303.  
  4304. <  First Hot Field: >
  4305. First Hot Field:
  4306.      Hot fields are a set of display-only fields that display the
  4307.      contents of the record under the selector bar.  They must
  4308.      appear consecutively in the Field List.
  4309.  
  4310.      Enter the name of the first hot field.
  4311.  
  4312. <  Last Hot Field: >
  4313. Last Hot Field:
  4314.      Enter the name of the last hot field.
  4315.  
  4316. <  Enable Hot Records >
  4317. [√] Enable Hot Records
  4318.      By enabling hot records the programmer has complete control
  4319.      at every list box movement from the Browse manager. With this
  4320.      option enabled, every movement of the point bar gets the
  4321.      record under the point bar into memory, looks up any many to
  4322.      one secondary files, computes any general formulas and
  4323.      executes any embedded source code which was entered in the
  4324.      'Process Selected Record' code window.
  4325.  
  4326. <  Enable Total Embeds >
  4327. [√] Enable Total Embeds
  4328.      Check this box to generate total field code, without the need
  4329.      for dummy formula fields.  Otherwise, you must define a total
  4330.      field with a formula class of SUM or AVG.
  4331.  
  4332. <Embedded Source>
  4333. Embedded Source
  4334.  
  4335. <  Data Section >
  4336. "Data Section"
  4337.      In the data section of the procedure after local data, the
  4338.      screen and pulldown structures.  This may be used to declare
  4339.      any data which you may want to use only in your embedded
  4340.      source code.
  4341.  
  4342. <  Setup Procedure >
  4343. "Setup Procedure"
  4344.      After the CODE statement.
  4345.  
  4346. <  Setup Screen >
  4347. "Setup Screen"
  4348.      After OPEN(Screen) statement.
  4349.  
  4350. <  Setup Pulldown>
  4351. "Setup Pulldown"
  4352.      After OPEN(PullDown) statement.
  4353.  
  4354. <  Set to First Record Before Total Loop>
  4355. "Set to First Record Before Total Loop"
  4356.      After the SET(key,key) for Range limits before beginning the
  4357.      total calculation LOOP.
  4358.  
  4359. <  Inside Total Loop, Immediately after NEXT>
  4360. "Inside Total Loop, Immediately after NEXT"
  4361.      Immediately after each record is read in the total
  4362.      calculation LOOP.
  4363.  
  4364. <  Inside Total Loop after Filter>
  4365. "Inside Total Loop after Filter"
  4366.      After each record is read and filter conditions are evaluated
  4367.      in the total calculation LOOP.
  4368.  
  4369. <  After Total Field Loop>
  4370. "After Total Field Loop"
  4371.      After all totals have been calculated.
  4372.  
  4373. <  LIST Class Formula>
  4374. "LIST Class Formula"
  4375.      After generation of LIST class formulas.  This embedded code
  4376.      window may be used instead of LIST class formulas.  This will
  4377.      allow setting up any fields which are displayed within the
  4378.      scrolling listbox.
  4379.  
  4380. <  End of General Formulas>
  4381. "End of General Formulas"
  4382.      When processing a screen field, the formulas which do not
  4383.      have a class of 'FILTER' of 'LIST' will be generated.  This
  4384.      embedded source window allows the entry of computations for
  4385.      screen display fields without the use of the formula
  4386.      formatter.
  4387.  
  4388. <  Case of No Records Found>
  4389. "Case of No Records Found"
  4390.      When no records are found to display.
  4391.  
  4392. <  After Filter and Range Check>
  4393. "After Filter and Range Check"
  4394.      After any record filter or Range limits are evaluated.
  4395.  
  4396. <  Set to First Record>
  4397. "Set to First Record"
  4398.      When using Range Limits, a SET() command is issued to locate
  4399.      the first record. This embedded source code window appears
  4400.      just after the generated SET() command and allows a
  4401.      programmer override of the SET() command.
  4402.  
  4403. <  Set to Last Record>
  4404. "Set to Last Record"
  4405.      When using Range Limits, a SET() command is used to locate
  4406.      the closest match to the last record.  This embedded source
  4407.      code window appears just after the generated SET() command
  4408.      and allows a programmer override of the SET() command.
  4409.  
  4410. <  Process Selected Record>
  4411. "Process Selected Record"
  4412.      When Enable Hot Records has been checked, code within this
  4413.      embedded source window will be executed upon movement of the
  4414.      point bar.  The record under the point bar will be retrieved
  4415.      into memory, any many to one secondary file records will be
  4416.      retrieved and any general formulas will be computed just
  4417.      prior to the insertion of this embedded source code.
  4418.  
  4419. <  End of Procedure>
  4420. "End of Procedure"
  4421.      Code placed in this window executes after all other code in
  4422.      the procedure has executed.  This code begins in column one,
  4423.      therefore you may use this window to write any ROUTINEs which
  4424.      are called from any other embedded source code window.
  4425.  
  4426. <  Prior to Update Procedure>
  4427. "Prior to Update Procedure"
  4428.      Immediately before the Update Procedure is called.
  4429.  
  4430. <  After Update Procedure>
  4431. "After Update Procedure"
  4432.      Immediately after return from the Update Procedure.
  4433.  
  4434. <  When Screen Field is Selected : >
  4435. "When Screen Field is Selected : "
  4436.      In the CASE SELECTED() structure, executed when the field is
  4437.      selected for entry.
  4438.  
  4439. <  When Screen Field is Completed: >
  4440. "When Screen Field is Completed: "
  4441.      In the CASE FIELD() structure, executed when the field has
  4442.      been completed.
  4443.  
  4444. <Formula Classes>
  4445. Formula Classes
  4446.  
  4447. <  FILTER >
  4448. FILTER
  4449.      A Conditional Field with "FILTER" in the Formula Class field
  4450.      is used to select which records are displayed.  If the
  4451.      Condition expression evaluates to zero (false) for a given
  4452.      record, it is not displayed.
  4453.  
  4454. <  LIST >
  4455. LIST
  4456.      A Conditional or Computed Field with "LIST" in the Formula
  4457.      Class field is used for those values which will be displayed
  4458.      in the list box and are only evaluated when the list box item
  4459.      is created.
  4460.  
  4461. <  SUM >
  4462. SUM
  4463.      A Computed Field with "SUM" in the Formula Class field
  4464.      calculates the total of the values contained in the field
  4465.      named in the Expression.  A Conditional Field with "SUM" in
  4466.      the Formula Class field conditionally calculates the total of
  4467.      the values contained in the fields named in the True and
  4468.      False Expressions.
  4469.  
  4470. <  AVG >
  4471. AVG
  4472.      A Computed Field with "AVG" in the Formula Class field
  4473.      calculates the arithmetic mean of the field named in the
  4474.      Expression.  A Conditional Field with "AVG" in the Formula
  4475.      Class field conditionally calculates the arithmetic mean of
  4476.      the fields named in the True and False Expressions.  In both
  4477.      cases, the total value is calculated, then divided by the
  4478.      number of records read to achieve that total.
  4479.  
  4480. <  No class (blank) >
  4481. No class (blank)
  4482.      Calculates the formula every time any field on the screen is
  4483.      completed.  The calculation code is generated before the
  4484.      field setup routines at the top of the processing LOOP.
  4485.  
  4486.  
  4487. <<The Source Template>>
  4488. <General Information>
  4489.  
  4490. The "Source" template generates a procedure comprised only of
  4491. embedded source code.  All executable statements in the
  4492. procedure, must be entered at the embedded source point labeled
  4493. "All Executable Source Code". The source entered must contain
  4494. (at least) a RETURN statement. The "Source" template is intended
  4495. for procedures that cannot be generated by any other template.
  4496.  
  4497. <Formatters Supported>
  4498. Formatters Supported
  4499.  
  4500. The "Source" template does not support the Application
  4501. Generator's Screen, Report, Pulldown Menu, or Formula
  4502. formatters.  However, the Text Editor's Screen, Report, and
  4503. Pulldown Menu Formatters can be invoked while entering embedded
  4504. source in the Data Section.
  4505.  
  4506. <Property Fields>
  4507. Property Fields
  4508.  
  4509. <  Prototype:>
  4510. Prototype:
  4511.      Enter the procedure's prototype (all except the procedure's
  4512.      name) to be placed in the program's MAP structure.  For
  4513.      example, if your procedure is a FUNCTION called MyProc and it
  4514.      will receive two parameters -- a STRING and a BYTE passed by
  4515.      address -- and return a STRING, you would enter :
  4516.  
  4517.          (STRING,*BYTE),STRING
  4518.  
  4519.      See FUNCTION and PROCEDURE Prototypes in the Language
  4520.      Reference for a discussion of valid prototypes.
  4521.  
  4522. <  Parameter List:>
  4523. Parameter List:
  4524.      Enter the complete parameter list (including parentheses) to
  4525.      be placed on the procedure's PROCEDURE or FUNCTION statement.
  4526.      This labels the passed parameters for reference within the
  4527.      procedure.  For the above example, you could enter:
  4528.  
  4529.          (Fred,Joe)
  4530.  
  4531.      The generated source code for the procedure would look like:
  4532.  
  4533.          MyProc          FUNCTION(Fred,Joe)
  4534.  
  4535.      In your executable code, you would reference the STRING
  4536.      parameter as "Fred" and the BYTE as "Joe."
  4537.  
  4538. <Embedded Source>
  4539. Embedded Source
  4540.  
  4541. <  Data Section >
  4542. "Data Section"
  4543.      In the data section of the procedure, after local data. This
  4544.      may be used to declare any data which you may want to use in
  4545.      your embedded source code.
  4546.  
  4547. <  All Executable Source Code >
  4548. "All Executable Source Code"
  4549.      All executable statements in the procedure must go in here.
  4550.  
  4551. <Formula Classes>
  4552. Formula Classes
  4553.  
  4554. No formula classes are supported by this procedure Template.
  4555. Formula fields are not supported.
  4556.  
  4557.  
  4558. <<The Table21 Template>>
  4559. <General Information>
  4560.  
  4561. The "Table21" template generates a procedure that scrolls data
  4562. files on the screen like a spreadsheet.  Unlike the List or
  4563. Browse templates, the Table uses a REPEAT structure instead of
  4564. a list box.  Table is similar to the Browse template, but allows
  4565. you the flexibility of coloring individual screen fields and
  4566. displaying multi-line individual records.
  4567.  
  4568. The Table21 Template is provided for compatibility with the
  4569. Clarion Professional Developer version 2.1-style TABLE
  4570. procedures.  When you import a TABLE procedure from a 2.1 .APP
  4571. file, this template is used but the BUTTON fields in the default
  4572. screen design are not generated (maintaining 2.1 compatibility).
  4573. Keystrokes for insert, change, and delete will be retained.
  4574. BUTTON fields are supported, but are not created in the
  4575. conversion process.
  4576.  
  4577. A Table21 procedure receives an omittable BYTE parameter that
  4578. defines the procedure's use at runtime:  "Standard mode" or
  4579. "Select mode."
  4580.  
  4581. "Standard mode" means no parameter was passed.  Therefore, the
  4582. procedure acts the same as all other Browse-type procedures:
  4583. when the user presses Enter on a highlighted record, the Update
  4584. Procedure is called; the Delete and Insert buttons are active;
  4585. and, if a "Select" button exists, it is dimmed.  This duplicates
  4586. the action of a version 2.1 TABLE that is not called as a
  4587. "lookup."
  4588.  
  4589. "Select mode" means a value of four (SelectRecord = 4) was
  4590. passed as the parameter and allows the Select button to be
  4591. active.  When an item is selected, its record is read from disk
  4592. into the record buffer and the Table21 procedure returns to the
  4593. calling procedure.  This duplicates the action of a version 2.1
  4594. "lookup" TABLE.  The hot key for the Change and Select buttons
  4595. should be EnterKey.
  4596.  
  4597. <Formatter Support>
  4598. Formatter Support
  4599.  
  4600. The "Table21" procedure in CLARION.APP is pre-loaded with a
  4601. screen layout with a REPEAT structure containing a POINT field
  4602. and pushbuttons named "Insert," "Change," "Delete," and "Exit."
  4603. These buttons are not created when importing a 2.1 TABLE from a
  4604. 2.1 .APP file.
  4605.  
  4606. If a pulldown structure has been created in the Pulldown Menu
  4607. Formatter, it is generated after the screen structure.  The
  4608. template makes no provision for opening or closing a pulldown
  4609. menu.  Such statements must be entered as embedded source.
  4610.  
  4611. The Report Formatter is not supported.
  4612.  
  4613. <Property Fields>
  4614. Property Fields
  4615.  
  4616. <  Range Limit Field:>
  4617. Range Limit Field:
  4618.      The range of records to be displayed can be limited by
  4619.      fixing the value of a component of the primary file access
  4620.      key.  For example, line items on an invoice can be limited
  4621.      to a single invoice.  The key for the item file might
  4622.      contain ITM:Invoice and ITM:Line containing the invoice
  4623.      number and line number of the item.
  4624.  
  4625.      ITM:Invoice would be the Range Limit Field, displaying only
  4626.      those records for a fixed invoice number.
  4627.  
  4628. <  Range Value Field:>
  4629. Range Value Field:
  4630.      The Range Value Field is the field which holds the value to
  4631.      be used as the limiting key component value.  The key
  4632.      component will be assigned this value.
  4633.  
  4634.      In this example, the current Invoice record might contain
  4635.      the number of the invoice that is being displayed.
  4636.      INV:Number would be the Range Value Field, supplying the
  4637.      value for the Range Limit Field. The Range Value Field
  4638.      must not be the same field as the Range Limit Field.
  4639.  
  4640. <  Record Filter:>
  4641. Record Filter:
  4642.      There are 2 ways to enter a record filter:
  4643.  
  4644.      The formula generator can be used with a formula class of
  4645.      'FILTER' to validate the expression as entered.
  4646.  
  4647.      Enter a free-form record filter expression in this field.  No
  4648.      validation is done on the code you enter -- an invalid
  4649.      expression will generate compiler errors.  If you are not
  4650.      familiar with the Clarion language statements or expressions,
  4651.      do not use this entry -- use a Formula field with the FILTER
  4652.      Formula Class instead.
  4653.  
  4654. <  Locator Field: >
  4655. Locator Field:
  4656.      A locator field is a screen entry field that updates a
  4657.      component of the primary file access key.  When a locator
  4658.      field is entered, the closest matching record is displayed in
  4659.      the list box.
  4660.  
  4661.      For example, scrolling a vendor file in vendor name sequence
  4662.      uses a key that contains the vendor name field (e.g.
  4663.      VND:Name).  To create a vendor name locator field, place a
  4664.      VND:Name entry field on the screen below the list box and
  4665.      enter VND:Name for the Locator Field.
  4666.  
  4667.      Once the user types a character on the keyboard, the locator
  4668.      field is selected and allows entry for the match.  Pressing
  4669.      the Tab key positions the point bar to the closest match.
  4670.  
  4671.      Another option is "Incremental Locator".  This template
  4672.      option allows one-half second for the user to type a new
  4673.      letter into the locator field.  At each pause longer than
  4674.      one-half second, the field contents are used to locate the
  4675.      closest match (the Tab key does not need to be pressed).  The
  4676.      backspace key is active during this process.
  4677.  
  4678. <  Incremental Locator >
  4679. [√] Incremental Locator
  4680.      Check this box to indicate that the Locator Field will act as
  4681.      an incremental locator.
  4682.  
  4683. <  Update Procedure:>
  4684. Update Procedure:
  4685.      Enter the name of the update procedure to be used to insert,
  4686.      change, or delete records.  If no update procedure is
  4687.      entered, the "Insert", "Change", and "Delete" pushbuttons
  4688.      should be removed from the screen layout.
  4689.  
  4690.      Special considerations may exist when using ASCII, DOS, and
  4691.      BASIC file drivers.  In some cases a PUT or DELETE is not
  4692.      allowed.  See the file driver's documentation for file driver
  4693.      specifics.
  4694.  
  4695. <  First Hot Field:>
  4696. First Hot Field:
  4697.      Hot fields are a set of display-only fields that display the
  4698.      contents of the record under the selector bar.  They must
  4699.      appear consecutively in the Field List.
  4700.  
  4701.      Enter the name of the first hot field.
  4702.  
  4703. <  Last Hot Field:>
  4704. Last Hot Field:
  4705.      Enter the name of the last hot field.
  4706.  
  4707. <Embedded Source>
  4708. Embedded Source
  4709.  
  4710. <  Data Section>
  4711. "Data Section"
  4712.      In the data section of the procedure after local data, the
  4713.      screen and pulldown structures.  This may be used to declare
  4714.      any data which you may want to use only in your embedded
  4715.      source code.
  4716.  
  4717. <  Setup Procedure>
  4718. "Setup Procedure"
  4719.      After the CODE statement.
  4720.  
  4721. <  Setup Screen>
  4722. "Setup Screen"
  4723.      After OPEN(Screen) statement.
  4724.  
  4725. <  LIST Class Formula>
  4726. "LIST Class Formula"
  4727.      After generation of LIST class formulas. This embedded
  4728.      code window may be used instead of LIST class formulas.
  4729.      This will allow setting up any fields which are displayed
  4730.      within the scrolling table.
  4731.  
  4732. <  End of General Formulas>
  4733. "End of General Formulas"
  4734.      When processing a screen field, the formulas which do not
  4735.      have a class of 'FILTER' of 'LIST' will be generated.  This
  4736.      embedded source window allows the entry of computations for
  4737.      screen display fields without the use of the formula
  4738.      formatter.
  4739.  
  4740. <  End of Procedure>
  4741. "End of Procedure"
  4742.      Code placed in this window executes after all other code in
  4743.      the procedure has executed.  This code begins in column one,
  4744.      therefore you may use this window to write any ROUTINEs which
  4745.      are called from any other embedded source code window.
  4746.  
  4747. <  When Screen Field is Selected : >
  4748. "When Screen Field is Selected : "
  4749.      In the CASE SELECTED() structure, executed when the field is
  4750.      selected for entry.
  4751.  
  4752. <  When Screen Field is Completed: >
  4753. "When Screen Field is Completed: "
  4754.      In the CASE FIELD() structure, executed when the field has
  4755.      been completed.
  4756.  
  4757. <Formula Classes>
  4758. Formula Classes
  4759.  
  4760. <  FILTER >
  4761. FILTER
  4762.      A Conditional Field with "FILTER" in the Formula Class field
  4763.      is used to select which records are displayed.  If the
  4764.      Condition expression evaluates to zero (false) for a given
  4765.      record, it is not displayed.
  4766.  
  4767.      Enter the expression for the Conditional field and leave the
  4768.      True and False conditions blank.  Only the Expression will be
  4769.      used for the filter. A filter expression may be entered in
  4770.      the Record Filter property field instead of using the formula
  4771.      formatter.
  4772.  
  4773. <  LIST >
  4774. LIST
  4775.      A Conditional or Computed Field with "LIST" in the Formula
  4776.      Class field is used for those values which will be
  4777.      displayed in the scrolling table and are only evaluated
  4778.      when the Table is built.
  4779.  
  4780. <  SUM >
  4781. SUM
  4782.      A Computed Field with "SUM" in the Formula Class field
  4783.      calculates the total of the values contained in the field
  4784.      named in the Expression.  A Conditional Field with "SUM" in
  4785.      the Formula Class field conditionally calculates the total of
  4786.      the values contained in the fields named in the True and
  4787.      False Expressions.
  4788.  
  4789. <  AVG >
  4790. AVG
  4791.      A Computed Field with "AVG" in the Formula Class field
  4792.      calculates the arithmetic mean of the field named in the
  4793.      Expression.  A Conditional Field with "AVG" in the Formula
  4794.      Class field conditionally calculates the arithmetic mean of
  4795.      the fields named in the True and False Expressions.  In both
  4796.      cases, the total value is calculated, then divided by the
  4797.      number of records read to achieve that total.
  4798.  
  4799. <  No class (blank) >
  4800. No class (blank)
  4801.      Calculates the formula every time any field on the screen is
  4802.      completed.  The calculation code is generated before the
  4803.      field edit routines at the top of the field processing code.
  4804.  
  4805.  
  4806. <<The ToDo Template>>
  4807. <General Information>
  4808.  
  4809. The "ToDo" template should not be selected for code generation.
  4810. Procedures, when first referenced, are automatically created as
  4811. ToDo until the template for code generation is selected.
  4812.  
  4813. No operation "Stub code" is generated for procedures which
  4814. remain as "ToDo" at source generation time.
  4815.  
  4816.  
  4817. <<The Update Template>>
  4818. <General Information>
  4819.  
  4820. This Template is not yet implemented.
  4821.  
  4822.  
  4823. <<The Validate Template>>
  4824. <General Information>
  4825.  
  4826. The "Validate" template generates a procedure that will be used
  4827. to perform entry field validation.  The procedure MUST be called
  4828. as the "When Field is Completed" Procedure on the entry field to
  4829. validate.  When the entry field has been completed, the Validate
  4830. procedure will be called to check for the existence of the value
  4831. in the current field against the specified key.  If no match is
  4832. found, a screen with a list box is presented to allow the user
  4833. to select a valid entry.
  4834.  
  4835. Selected fields from the data file are displayed as columns in
  4836. a list box.  Columns that do not fit in the list box are
  4837. displayed using the horizontal scroll bar or the left and right
  4838. arrow keys.
  4839.  
  4840. A selector bar is always positioned over a single row.  The up
  4841. and down arrow keys move the selector bar.  Moving the selector
  4842. bar up off the top row or down off the bottom row scrolls a new
  4843. record into the list box.  The PGUP and PGDN keys scroll the
  4844. prior and next pages of records into the list box.  CTRL-PGUP
  4845. displays the first page of records and CTRL-PGDN displays the
  4846. last page of records.  Pressing the right mouse button in the
  4847. top half of the list box scrolls up and in the bottom half
  4848. scrolls down.  The ENTER key and the mouse DOUBLE-CLICK selects
  4849. the highlighted record and completes the procedure.
  4850.  
  4851. The Validate Template uses PRESS to place the selected value
  4852. into the entry field it was called to validate.  Therefore, if
  4853. numeric data is being validated, the typing mode of that field
  4854. should be INSERT.  This allows PRESS to put the correct value
  4855. into the field.
  4856.  
  4857. The "Select", "Insert" and "Change" pushbuttons, or any other
  4858. field that processes the record under the selector bar MUST be
  4859. placed after the LIST field in the Field List.
  4860.  
  4861. An optional locator field finds a specific record in the file.
  4862. Typing any letter while the LIST field is active selects the
  4863. locator field.  Completing the locator field with a Tab key or
  4864. mouse click displays the closest matching record at the top of
  4865. the list box.
  4866.  
  4867. A set of display-only fields can be designated as "hot fields"
  4868. on screen.  Hot fields display values from the record currently
  4869. highlighted by the selector bar and change whenever the selector
  4870. bar moves.  This allows display of more information from the
  4871. highlighted record than just the one line in the List box.
  4872. These hot fields MUST appear consecutively in the Field List but
  4873. may be placed anywhere on screen.
  4874.  
  4875. When you define a SUM or AVG formula class, total field code
  4876. generation is automatically enabled.
  4877.  
  4878. <Formatter Support>
  4879. Formatter Support
  4880.  
  4881. The "Validate" procedure in CLARION.APP is pre-loaded with a
  4882. screen layout containing a list box and pushbuttons named
  4883. "Select", "Insert", and "Change".  The field equate label of the
  4884. list box MUST be "?List" and the "Immediate" attribute MUST be
  4885. on turned on.  The horizontal scroll bar can be turned off if
  4886. the required information fits in the list box.  All other
  4887. properties of the list box can be changed.
  4888.  
  4889. Fields from related files may be scrolled in the list box as
  4890. "lookups" will be done automatically from the Primary file in
  4891. the file schematic to Secondary files with a "Many to 1"
  4892. relationship.  "1 to Many" relationships are not supported by
  4893. this procedure Template.
  4894.  
  4895. The "Insert" and "Change" pushbuttons call an update procedure
  4896. to process the selected record (normally created with a "Form"
  4897. template).  The name of the procedure must be entered as the
  4898. "Update Procedure". If there is no update procedure entered,
  4899. these pushbuttons may be deleted.  The ENTER key and mouse
  4900. DOUBLE-CLICK while on the listbox will select the record under
  4901. the selector bar and enter the value in the entry field.
  4902.  
  4903. Local data is generated before the screen structure.  If a
  4904. pulldown structure has been created by the Pulldown Menu
  4905. Formatter, it is generated after the screen structure.  The
  4906. template makes no provision for opening or closing a pulldown
  4907. menu (you must write embedded source for this).
  4908.  
  4909. <Property Fields>
  4910. Property Fields
  4911.  
  4912. <  Range Limit Field: >
  4913. Range Limit Field:
  4914.      The range of records to be displayed can be limited by fixing
  4915.      the value of a component of the primary file access key.  For
  4916.      example, line items on an invoice can be limited to a single
  4917.      invoice.  The key for the item file might contain ITM:Invoice
  4918.      and ITM:Line containing the invoice number and line number of
  4919.      the item.
  4920.  
  4921.      ITM:Invoice would be the Range Limit Field, displaying only
  4922.      those records for a fixed invoice number.
  4923.  
  4924. <  Range Value Field: >
  4925. Range Value Field:
  4926.      The Range Value Field is the field which holds the value to
  4927.      be used as the limiting key component value.  The key
  4928.      component will be assigned this value.
  4929.  
  4930.      In this example, the current Invoice record might contain the
  4931.      number of the invoice that is being displayed.  INV:Number
  4932.      would be the Range Value Field, supplying the value for the
  4933.      Range Limit Field.  The Range Value Field must not be the
  4934.      same field as the Range Limit Field.
  4935.  
  4936. <  Record Filter:>
  4937. Record Filter:
  4938.      There are 2 ways to enter a record filter:
  4939.  
  4940.      The formula generator can be used with a formula class of
  4941.      'FILTER' to validate the expression as entered.
  4942.  
  4943.      Enter a free-form record filter expression in this field.  No
  4944.      validation is done on the code you enter -- an invalid
  4945.      expression will generate compiler errors.  If you are not
  4946.      familiar with the Clarion language statements or expressions,
  4947.      do not use this entry -- use a Formula field with the FILTER
  4948.      Formula Class instead.
  4949.  
  4950. <  Lookup Field: >
  4951. Lookup Field:
  4952.      Enter the name of the field to be used to validate against
  4953.      your entry field.  This field should be the only field in a
  4954.      single-component unique key.
  4955.  
  4956. <  Input Field Picture: >
  4957. Input Field Picture:
  4958.      Some fields do not appear on screen in the same format as the
  4959.      data exists in the file (and in the key).  These fields must
  4960.      have an Input Field Picture to DEFORMAT the data for
  4961.      validation and to FORMAT the selected data for on-screen
  4962.      display.
  4963.  
  4964.      Enter the display picture to DEFORMAT the data for
  4965.      validation.  This picture is also used to FORMAT the data to
  4966.      PRESS it into the keyboard buffer and fill the entry field
  4967.      when a record is selected from this procedure's list.
  4968.  
  4969.      Examples of fields which require an Input Field Picture:
  4970.  
  4971.      Any STRING, CSTRING, or PSTRING with an implied decimal
  4972.      storage picture (for example, @N6v2).
  4973.  
  4974.      Any numeric data field (LONG, DATE, USHORT, etc.) with a date
  4975.      (@D1, @D2, etc.) or time (@T1, @T2, etc.) display picture.
  4976.  
  4977.      Any numeric data field (REAL, BFLOAT, etc.) with a display
  4978.      picture which includes a decimal portion (for example,
  4979.      @N6.2).
  4980.  
  4981. <  Locator Field: >
  4982. Locator Field:
  4983.      A locator field is a screen entry field that updates a
  4984.      component of the primary file access key.  When a locator
  4985.      field is entered, the closest matching record is displayed in
  4986.      the list box.
  4987.  
  4988.      For example, scrolling a vendor file in vendor name sequence
  4989.      uses a key that contains the vendor name field (e.g.
  4990.      VND:Name).  To create a vendor name locator field, place a
  4991.      VND:Name entry field on the screen below the list box and
  4992.      enter VND:Name for the Locator Field.
  4993.  
  4994.      Once the user types a character on the keyboard, the locator
  4995.      field is selected and allows entry for the match.  Pressing
  4996.      the Tab key positions the point bar to the closest match.
  4997.  
  4998. <  Display Key: >
  4999. Display Key:
  5000.      If using one key for entry field validation and another key
  5001.      as the display key, enter the name of the display key here.
  5002.      Otherwise, leave this field blank.
  5003.  
  5004. <  Update Procedure: >
  5005. Update Procedure:
  5006.      Enter the name of the update procedure to be used to insert,
  5007.      change, or delete records.  If no update procedure is
  5008.      entered, the "Insert" and "Change" pushbuttons should be
  5009.      removed from the screen layout.
  5010.  
  5011. <  First Hot Field: >
  5012. First Hot Field:
  5013.      Hot fields are a set of display-only fields that display the
  5014.      contents of the record under the selector bar.  They must
  5015.      appear consecutively in the Field List.
  5016.  
  5017.      Enter the name of the first hot field.
  5018.  
  5019. <  Last Hot Field: >
  5020. Last Hot Field:
  5021.      Enter the name of the last hot field.
  5022.  
  5023. <  Enable Hot Records >
  5024. [√] Enable Hot Records
  5025.      By enabling hot records the programmer has complete control
  5026.      at every list box movement from the Browse manager. With this
  5027.      option enabled, every movement of the point bar gets the
  5028.      record under the point bar into memory, looks up any many to
  5029.      one secondary files, computes any general formulas and
  5030.      executes any embedded source code which was entered in the
  5031.      'Process Selected Record' code window.
  5032.  
  5033. <  Lookup Hot Key: >
  5034. Lookup Hot Key:
  5035.      When the Validate procedure is being called by a hot key,
  5036.      enter the hot key here.  When a hot key is entered and the
  5037.      hot key is detected upon entry of the Validate procedure, the
  5038.      screen will be opened.  No validation check will be done
  5039.      prior to the open of the screen.
  5040.  
  5041. <Embedded Source>
  5042. Embedded Source
  5043.  
  5044. <  Data Section>
  5045. "Data Section"
  5046.      In the data section of the procedure after local data, the
  5047.      screen and pulldown structures.  This may be used to declare
  5048.      any data which you may want to use only in your embedded
  5049.      source code.
  5050.  
  5051. <  Setup Procedure>
  5052. "Setup Procedure"
  5053.      After the CODE statement.
  5054.  
  5055. <  Before Validate Lookup>
  5056. "Before Validate Lookup"
  5057.      After opening the primary file, you may enter source code in
  5058.      this window to pre-fill any fields which will be used by the
  5059.      lookup other than the Lookup Field.
  5060.  
  5061. <  Setup Screen>
  5062. "Setup Screen"
  5063.      After OPEN(Screen).
  5064.  
  5065. <  Setup Pulldown>
  5066. "Setup Pulldown"
  5067.      After OPEN(PullDown) statement.
  5068.  
  5069. <  Set to First Record Before Total Loop>
  5070. "Set to First Record Before Total Loop"
  5071.      After the SET(key,key) for Range limits before beginning the
  5072.      total calculation LOOP.
  5073.  
  5074. <  Inside Total Loop, Immediately after NEXT>
  5075. "Inside Total Loop, Immediately after NEXT"
  5076.      Immediately after each record is read in the total
  5077.      calculation LOOP.
  5078.  
  5079. <  Inside Total Loop after Filter>
  5080. "Inside Total Loop after Filter"
  5081.      After each record is read and filter conditions are evaluated
  5082.      in the total calculation LOOP.
  5083.  
  5084. <  After Total Field Loop>
  5085. "After Total Field Loop"
  5086.      After all totals have been calculated.
  5087.  
  5088. <  LIST Class Formula>
  5089. "LIST Class Formula"
  5090.      After generation of LIST class formulas.  This embedded code
  5091.      window may be used instead of LIST class formulas.  This will
  5092.      allow setting up any fields which are displayed within the
  5093.      scrolling listbox.
  5094.  
  5095. <  End of General Formulas>
  5096. "End of General Formulas"
  5097.      When processing a screen field, the formulas which do not
  5098.      have a class of 'FILTER' of 'LIST' will be generated.  This
  5099.      embedded source window allows the entry of computations for
  5100.      screen display fields without the use of the formula
  5101.      formatter.
  5102.  
  5103. <  Case of No Records Found>
  5104. "Case of No Records Found"
  5105.      When no records are found to display.
  5106.  
  5107. <  After Filter and Range Check>
  5108. "After Filter and Range Check"
  5109.      After any record filter or Range limits are evaluated.
  5110.  
  5111. <  Set to First Record>
  5112. "Set to First Record"
  5113.      When using Range Limits, a SET() command is issued to locate
  5114.      the first record. This embedded source code window appears
  5115.      just after the generated SET() command and allows a
  5116.      programmer override of the SET() command.
  5117.  
  5118. <  Set to Last Record>
  5119. "Set to Last Record"
  5120.      When using Range Limits, a SET() command is used to locate
  5121.      the closest match to the last record.  This embedded source
  5122.      code window appears just after the generated SET() command
  5123.      and allows a programmer override of the SET() command.
  5124.  
  5125. <  Process Selected Record>
  5126. "Process Selected Record"
  5127.      When Enable Hot Records has been checked, code within this
  5128.      embedded source window will be executed upon movement of the
  5129.      point bar.  The record under the point bar will be retrieved
  5130.      into memory, any many to one secondary file records will be
  5131.      retrieved and any general formulas will be computed just
  5132.      prior to the insertion of this embedded source code.
  5133.  
  5134. <  End of Procedure>
  5135. "End of Procedure"
  5136.      Code placed in this window executes after all other code in
  5137.      the procedure has executed.  This code begins in column one,
  5138.      therefore you may use this window to write any ROUTINEs which
  5139.      are called from any other embedded source code window.
  5140.  
  5141. <  Prior to Update Procedure>
  5142. "Prior to Update Procedure"
  5143.      Immediately before the Update Procedure is called.
  5144.  
  5145. <  After Update Procedure>
  5146. "After Update Procedure"
  5147.      Immediately after return from the Update Procedure.
  5148.  
  5149. <  When Screen Field is Selected : >
  5150. "When Screen Field is Selected : "
  5151.      In the CASE SELECTED() structure, executed when the field is
  5152.      selected for entry.
  5153.  
  5154. <  When Screen Field is Completed: >
  5155. "When Screen Field is Completed: "
  5156.      In the CASE FIELD() structure, executed when the field has
  5157.      been completed.
  5158.  
  5159. <Formula Classes>
  5160. Formula Classes
  5161.  
  5162. <  LIST >
  5163. LIST
  5164.      A Conditional or Computed Field with "LIST" in the Formula
  5165.      Class field is used for those values which will be displayed
  5166.      in the list box and are only evaluated when the list box item
  5167.      is created.
  5168.  
  5169. <  SUM >
  5170. SUM
  5171.      A Computed Field with "SUM" in the Formula Class field
  5172.      calculates the total of the values contained in the field
  5173.      named in the Expression.  A Conditional Field with "SUM" in
  5174.      the Formula Class field conditionally calculates the total of
  5175.      the values contained in the fields named in the True and
  5176.      False Expressions.
  5177.  
  5178. <  AVG >
  5179. AVG
  5180.      A Computed Field with "AVG" in the Formula Class field
  5181.      calculates the arithmetic mean of the field named in the
  5182.      Expression.  A Conditional Field with "AVG" in the Formula
  5183.      Class field conditionally calculates the arithmetic mean of
  5184.      the fields named in the True and False Expressions.  In both
  5185.      cases, the total value is calculated, then divided by the
  5186.      number of records read to achieve that total.
  5187.  
  5188. <  No class (blank) >
  5189. No class (blank)
  5190.      Calculates the formula every time any field on the screen is
  5191.      completed.  The calculation code is generated before the
  5192.      field setup routines at the top of the processing LOOP.
  5193.  
  5194.  
  5195. <<The View Template>>
  5196. <General Information>
  5197.  
  5198. The View Template displays any ASCII text file in a scrolling
  5199. list box. It is normally used to display a report to the screen
  5200. that was previously written to disk.  The View template may be
  5201. used to create a procedure which is the Next Procedure of a File
  5202. template.  This will allow the user to select a file to view
  5203. from a list of available files.
  5204.  
  5205. The text will scroll up or down using the up and down arrow keys
  5206. or the vertical scroll bar. Pressing the right mouse button in
  5207. the top half of the list box scrolls up and in the bottom half
  5208. scrolls down. Left and right scrolling is supported with END,
  5209. HOME, the horizontal scroll bar, or the left and right arrow
  5210. keys.
  5211.  
  5212. The DOS File definition is defined in the template.  The record
  5213. (one line of the report) is defined with a length of 255.
  5214.  
  5215. If "Progress Indicator" is checked on then a message will be
  5216. displayed to the user while reading the file from disk. This is
  5217. recommended for larger reports to let the user know that the
  5218. program is still active while reading the file from disk.
  5219.  
  5220. While reading the file from disk, the scrolling keys may be used
  5221. (PgUp, PgDn, Up, Dn, etc...) to scroll the queue.  The mouse
  5222. cursor will not be active until the entire file has been read.
  5223.  
  5224. No changes are required in the Screen Formatter or the Data
  5225. Section.  To use the template, just indicate the name of the DOS
  5226. file to display.
  5227.  
  5228. <Formatter Support>
  5229. Formatter Support
  5230.  
  5231. The Screen Formatter is available for this template and is
  5232. preloaded with a default SCREEN.  The LIST box and Exit button
  5233. are required.  The LIST box may be resized or positioned.
  5234.  
  5235. The SCREEN has three pushbuttons:  "Exit," "Print" and "25/50
  5236. Mode."
  5237.  
  5238. The Exit button is required and may not be removed.  The field
  5239. equate label must be ?Exit.
  5240.  
  5241. The Print button prints the file being viewed.  A print device
  5242. field is activated to allow the user to select the output
  5243. device.  If the Print button is deleted, the PrintDevice field
  5244. must also be deleted.
  5245.  
  5246. The 25/50 Mode button attempts to toggle the current text mode
  5247. between 25 and 50 line mode.  The SCREEN will be re-opened in
  5248. the new mode and the listbox will be expanded, since the screen
  5249. structure in the default application file has an EXPAND
  5250. attribute with row 10 identified as the row to duplicate.  Since
  5251. the SETTEXT command is used, the mode will be changed to the
  5252. closest match.  For EGA systems the closest match to 50 line
  5253. mode will be 43 line mode.  This button may be removed from the
  5254. SCREEN structure to disable video mode switching.
  5255.  
  5256. The Report Formatter is not available.
  5257.  
  5258. <Property Fields>
  5259. Property Fields
  5260.  
  5261. <  File to View: >
  5262. File to View:
  5263.      This is the ASCII file to be displayed in the list box. It
  5264.      may be a string constant or a variable. If it is a constant
  5265.      it should be enclosed in 'quotes'. If it is a variable, the
  5266.      variable should be declared in the Global Data Section of the
  5267.      program.
  5268.  
  5269.      When left blank, a variable from the default application is
  5270.      used (GLO:Filespec in CLARION.APP).  This is the same default
  5271.      variable used in the File template.
  5272.  
  5273. <  Warning Size (in K): >
  5274. Warning Size (in K):
  5275.      The View template will read the entire file into a Queue for
  5276.      runtime performance.  However, If you have a file larger than
  5277.      the assigned virtual memory block (Queue elements are saved
  5278.      in virtual by default unless virtual memory support is turned
  5279.      off) the Queue may be written to disk.  This may
  5280.      substantially slow the scrolling of the file.  A warning
  5281.      screen may be displayed when a selected file is larger than
  5282.      a specified size.  This size will be multiplied by 1024 and
  5283.      compared against the actual file size.
  5284.  
  5285. <  Maximum Line Length: >
  5286. Maximum Line Length:
  5287.      Most reports will not be wider than 80 or 132 columns. This
  5288.      allows an opportunity to check for files which do not
  5289.      typically have a carriage return / line feed combination in
  5290.      the first X number of characters.  (like .EXE and .COM files)
  5291.      The number entered here will be used to check the number of
  5292.      bytes in each ASCII file record as it is read.  If a line
  5293.      read has more than the number of characters which are
  5294.      specified as the maximum, an error window will appear and the
  5295.      view will be aborted.  Typically for an .EXE file this will
  5296.      occur in the first record read and no 'garbage' will be
  5297.      displayed in the listbox.  If no Maximum Line Length is
  5298.      entered, the default of 200 is used.
  5299.  
  5300. <  Progress Indicator >
  5301. [√] Progress Indicator
  5302.      If this box is checked on, a message will be displayed to the
  5303.      user while the file is read from disk.
  5304.  
  5305. <  Progress Character:>
  5306. Progress Character:
  5307.      You may enter the ASCII character to be used as the 'bar.'
  5308.      Easy entry of high order ascii characters may be made by
  5309.      using the ASCII value found in the ASCII chart from the Tools
  5310.      menu.  The ASCII value should be surrounded by angle brackets
  5311.      within single quotes.  The Default Application file is
  5312.      preloaded with a shaded bar character '<176>'.
  5313.  
  5314. <Embedded Source>
  5315. Embedded Source
  5316.  
  5317. <  Data Section >
  5318. "Data Section"
  5319.      In the data section of the procedure before local data, the
  5320.      screen and pulldown structures.  This may be used to declare
  5321.      any data which you may want to use only in your embedded
  5322.      source code.
  5323.  
  5324. <  Setup Procedure >
  5325. "Setup Procedure"
  5326.      After the CODE statement.
  5327.  
  5328. <  Setup Screen >
  5329. "Setup Screen"
  5330.      After OPEN(Screen).
  5331.  
  5332. <  Top of Accept Loop>
  5333. "Top of Accept Loop"
  5334.       At the top of the screen field processing loop.
  5335.  
  5336. <  Immediately Before RETURN for non-ASCII file error>
  5337. "Immediately Before RETURN for non-ASCII file error"
  5338.      When the procedure detects that a line is longer than the
  5339.      maximum specified by the Warning Size it returns to the
  5340.      caller with an error message.
  5341.  
  5342. <  After NEXT in RptFile Loop >
  5343. "After NEXT in RptFile Loop"
  5344.      In the loop that read the DOS file from disk, after the NEXT
  5345.      statement.
  5346.  
  5347. <  Immediately After LOOP, before FREE(Queue)>
  5348. "Immediately After LOOP, before FREE(Queue)"
  5349.      After the screen processing loop is complete, indicating the
  5350.      user is finished viewing the text.  The queue still contains
  5351.      the text at this point.
  5352.  
  5353. <  End of Procedure >
  5354. "End of Procedure"
  5355.      Code placed in this window executes after all other code in
  5356.      the procedure has executed.  This code begins in column one,
  5357.      therefore you may use this window to write any ROUTINEs which
  5358.      are called from any other embedded source code window or code
  5359.      that should be execute at the end of the procedure.
  5360.  
  5361. <  When Screen Field is Selected : >
  5362. "When Screen Field is Selected : "
  5363.      In the CASE SELECTED() structure, executed when the field is
  5364.      selected for entry.
  5365.  
  5366. <  When Screen Field is Completed: >
  5367. "When Screen Field is Completed: "
  5368.      In the CASE FIELD() structure, executed when the field has
  5369.      been completed.
  5370.  
  5371. <Formula Classes>
  5372. Formula Classes
  5373.  
  5374. No formula classes are supported by this procedure Template.
  5375. Formula fields are not supported.
  5376.  
  5377.  
  5378.