home *** CD-ROM | disk | FTP | other *** search
/ TestDrive Super Store 2.3 / TESTDRIVE_2.ISO / jetform / jfdfunct.hlp < prev    next >
Encoding:
Text File  |  1994-03-09  |  74.7 KB  |  2,864 lines

  1. ^category Arithmetic
  2. ^Function Abs (n1)
  3.  
  4. Returns the absolute value of a number.
  5.  
  6. n1 is the number to evaluate.
  7.  
  8. Examples:
  9.  
  10.     Abs(FIELDA) returns positive value of the current 
  11.     value of FIELDA.  Activitate the numeric attribute 
  12.     when using this function.
  13.   
  14.     Abs(1.03) returns 1.03
  15.     Abs(-1.03) returns 1.03
  16.     Abs(0) returns 0
  17.  
  18. Related Functions:
  19.  
  20.     Avg, Ceiling, Count, Exp, Floor, Max, Min, Mod, Pi,
  21.     Round, SerialNum, Sqrt, Sum
  22.  
  23. ^Function Avg (n1,[n2, ..., n100])
  24.  
  25. This function computes the average of up to 100
  26. values. The values may be individual parameters,
  27. or may be a repeating field name.
  28.  
  29. Note that any empty fields evaluate as if they
  30. contain the value 0 (zero). 
  31.  
  32. Example:    
  33.  
  34. If you had a calculation like this:   
  35.  
  36.        Avg(field1,field2,field3,field4)
  37.  
  38. where field1 has a value of 8, and field2,
  39. field3, and field4 are empty, returns a 
  40. value of 2.
  41.  
  42. Related Functions:
  43.  
  44.     Abs, Ceiling, Count, Exp, Floor, Max, Min, Mod, Pi,
  45.     Round, SerialNum, Sqrt, Sum
  46.  
  47. ^Function Ceiling (n1)
  48.  
  49. Returns the whole number greater than or equal
  50. to n1.
  51.  
  52. n1 is the number to evaluate.
  53.  
  54. Examples:
  55.  
  56.     Ceiling(1.9) returns 2
  57.     Ceiling(2) returns 2
  58.     Ceiling(2.1) returns 3
  59.     Ceiling(-1.9) returns -1
  60.     Ceiling(A) returns 100 if A=99.999
  61.  
  62. Related Functions:
  63.  
  64.     Abs, Avg, Count, Exp, Floor, Lower, Max, Min, 
  65.     Mod, Pi, Round, Sqrt, Str, Upper
  66.  
  67. ^Function Count (f1)
  68.  
  69. Counts the number of non-zero (for numeric) fields or 
  70. non-null (for alphanumeric) fields on a page.
  71.  
  72. f1 is the value to test, typically a field name.
  73.  
  74. All occurrences of the field are processed. Count
  75. is most useful in situations where multiple line
  76. items are possible, but not all are filled in.
  77.  
  78. For example, to compute the average price for a
  79. luncheon, use the count function to tell you how 
  80. many of the attendee name fields contained non-null
  81. values. Divide the value in the total cost field by this
  82. result to obtain the average price.
  83.  
  84. Example:
  85.  
  86.  Count(FIELDA ) 
  87.  Return the number of occurrences FIELDA that are 
  88.  non-zero or non-null.
  89.  
  90. Sum(FIELDB)/Count(FIELDB)
  91.  Compute an average of the values entered in 
  92.  FIELDB.
  93.  
  94. Related Functions:
  95.  
  96.    Abs, Avg, Ceiling, Exp, Floor, Lower, Max, Min, 
  97.    Mod, Pi, Round, SerialNum, Sqrt, Str, Sum, 
  98.    Upper
  99.  
  100. ^Function Exp (n1, n2)
  101.  
  102. This function computes the value of n1 raised to
  103. the power n2. If both n1 and n2 are 0 (zero),
  104. this function returns zero. If n1 is a negative
  105. number, the calculation uses the floor value of
  106. n2 as the exponent.
  107.  
  108. For example, the function:
  109.  
  110.         Exp(3,2) returns 9
  111.  
  112. Related Functions:
  113.  
  114.     Abs, Avg, Ceiling, Count, Floor, Max, Min, Mod, Pi,
  115.     Round, SerialNum, Sqrt, Sum
  116.  
  117. ^Function Floor (n1)
  118.  
  119. Returns the largest whole number that is less
  120. than or equal to the specified value.
  121.  
  122. n1 is the value to evaluate.
  123.  
  124. Examples:
  125.  
  126.   Floor(6.5) returns 6
  127.   Floor(7.0) returns 7
  128.   Floor(FIELDA) returns 99 if FIELDA is 99.999
  129.  
  130. Related Functions:
  131.  
  132.     Abs, Avg, Ceiling, Count, Exp, Max, Min, Mod, Pi,
  133.     Round, SerialNum, Sqrt, Str, Sum, Upper
  134.  
  135. ^Function Max (n1,[n2],..., [n99])
  136.  
  137. Returns the maximum value of a specified set of
  138. numbers.
  139.  
  140. n1 is the first value in the set.
  141.  
  142. n2 to n99 are optional values in the set.
  143.  
  144. The number of parameters can be as long as you
  145. like. One parameter must be provided.
  146.  
  147. If only one parameter is given it is assumed to
  148. be a field with multiple occurrences on the
  149. form. In this case the maximum value of all
  150. occurrences is returned.
  151.  
  152. Examples:
  153.  
  154. Max(ITEMTOTAL) returns the maximum value found
  155. in all occurrences of the field ITEMTOTAL. Note
  156. that you do not enclose the field name in quotation
  157. marks.
  158.  
  159.   Max(7,10,-4,6) returns 10
  160.  
  161. Related Functions:
  162.  
  163.     Abs, Avg, Ceiling, Count, Exp, Floor, Lower, Min, 
  164.     Mod, Pi, Round, SerialNum, Sqrt, STR, Sum, 
  165.     Upper
  166.  
  167. ^Function Min (n1,[n2],[n3],..., [n99])
  168.  
  169. Returns the minimum value of a specified set of
  170. numbers.
  171.  
  172. n1 is the first value in the set.
  173.  
  174. n2 to n99 are optional values in the set.
  175.  
  176. The number of parameters can be as long as you
  177. like.  At least one parameter must be provided.
  178.  
  179. If only one parameter is given, it is assumed to
  180. be a field name, and the minimum value of all
  181. occurrences for that field is returned.
  182.  
  183. Examples:
  184.  
  185. Min(ITEMTOTAL) returns the minimum value found
  186. in all occurrences of the field ITEMTOTAL. Do not
  187. enclose the field name in quotation marks.
  188.  
  189. Min(7,10,-4,6) returns -4
  190.  
  191. Related Functions:
  192.  
  193.     Abs,  Ceiling, Count,  Floor, Lower, Max, Mod, 
  194.     Pi, Round, SerialNum, Sqrt, Str, Upper.
  195.  
  196. ^Function Mod (n1, n2)
  197.  
  198. Returns the remainder from a division of two
  199. numeric values.
  200.  
  201. n1 is the dividend.
  202.  
  203. n2 is the divisor.
  204.  
  205. Examples:
  206.  
  207. Mod(64,2)
  208.  Returns 0, because the division does not result in a 
  209.  remainder.
  210.  
  211. Mod(12,5)
  212.  Returns 2, because 12/2 gives a result of 5 with 
  213.  a remainder of 2.
  214.  
  215. Mod(FIELDA,FIELDB)
  216.  Calculate the value of FIELDA divided by the value 
  217.  of FIELDB, and return any remainder.
  218.  
  219. Related Functions:
  220.  
  221.     Abs, Avg, Ceiling, Count, Exp, Floor, Lower, Max, 
  222.     Min, Mod, Pi, Round, SerialNum, Sqrt, STR, Sum,
  223.     Upper
  224.  
  225. ^Function Pi ()
  226.  
  227. Returns the value of pi (3.1415926...) which can
  228. be used as a constant in any calculation rule.
  229. No parameters are required.
  230.  
  231. Example:
  232.  
  233. Pi( )*(RADIUS*RADIUS) for the field CIRCLEAREA.
  234.  
  235. Related Functions:
  236.  
  237.     Abs, Avg, Ceiling, Count, Exp, Floor, Max, Min, 
  238.     Mod, Round, SerialNum, Sqrt, Sum
  239.  
  240. ^Function Round (n1, [n2])
  241.  
  242. Returns a number rounded to a specified number
  243. of decimal places.
  244.  
  245. n1 is the number to be evaluated. If a field name is
  246. used as this parameter, do not enclose it in
  247. quotation marks.
  248.  
  249. n2 is the number of decimal places. If not
  250. specified, 0 is used as the default.
  251.  
  252. Examples:
  253.  
  254.     Round(33.2345,3) returns 33.235
  255.     Round(20/3,2) returns 6.67
  256.     Round(-1.3,0) returns -1
  257.     Round(TOTAL,2) returns 2.33 if the value of the
  258.     field TOTALis 2.3333.
  259.  
  260. Related Functions:
  261.  
  262.     Abs, Avg, Ceiling, Count, Exp, Floor, Lower,Max, 
  263.     Min, Mod, Pi, SerialNum, Sqrt, Sum, Upper
  264.  
  265. ^Function SerialNum (filename)
  266.  
  267. Returns the next serial number available from the 
  268. designated file. If the current field is not blank,
  269. its contents are returned. The file must contain the 
  270. starting number and may contain an increment value 
  271. as well as a picture format. 
  272.  
  273. Example:
  274.  
  275. Assume that the file had the following contents:
  276.     Increment     = 1
  277.     Picture Format     = #SSN-AB999C99
  278.     Number     = 10079
  279.  
  280. "Number=" MUST be the LAST line in the file.
  281.  
  282. The next two calls with the SerialNum function
  283. would result in #SN-AB100C79 and #SN-AB100C80.
  284.  
  285. Related Functions:
  286.  
  287.     Abs, Avg, Ceiling, Count, Exp, Floor, Max, Min, 
  288.     Mod, Pi, Round, Sqrt, Sum
  289.  
  290. ^Function Sqrt (n1)
  291.  
  292. Returns the square root of a given number.
  293.  
  294. n1 is the number to be evaluated. If a field name is 
  295. used as this parameter, do not enclose it in quotation 
  296. marks.
  297.  
  298. The result will display up to 6 decimal places.
  299.  
  300. Examples:
  301.  
  302.     Sqrt(4) return 2
  303.     Sqrt(100) returns 10
  304.  
  305. Related Functions:
  306.  
  307.     Abs, Avg, Ceiling, Count, Exp, Floor, Lower, Max, 
  308.     Min, Mod, Pi, Round, SerialNum, Sqrt, Sum, 
  309.     Upper
  310.  
  311.  
  312. ^Function Sum (n1,[n2],[n3], ..., [n99])
  313.  
  314. Returns the sum of the specified set of numbers.
  315.  
  316. n1 is the first value to be summed.
  317.  
  318. n2 to n99 are optional values in the set of
  319. numbers to be summed.
  320.  
  321. If only one parameter is given then it is
  322. assumed to be a field with multiple occurrences
  323. in the form. The sum of all occurrences is
  324. calculated.
  325.  
  326. Examples:
  327.  
  328.     Sum(1,2,3,4) returns 10
  329.     Sum(ITEMTOTAL) returns the sum of all
  330.     occurrences of the field ITEMTOTAL.
  331.  
  332. Related Functions:
  333.  
  334.     Abs, Avg, Ceiling, Count, Exp, Floor, Max, Min, 
  335.     Mod, Pi, Round, SerialNum, Sqrt
  336.  
  337.  
  338. ^category Database Access
  339. ^Function DbFetch (s1, s2, [n1], [s3], [s4])
  340.  
  341. Retrieves a record from a specified database
  342. file and stores the data in a buffer.
  343.  
  344. s1 is the file name enclosed in quotation
  345. marks.
  346.  
  347. s2 is the database field name used as a
  348. key for the retrieval. 
  349.  
  350. n1 is an optional buffer number where the
  351. retrieved record is saved. If n1 is not
  352. specified, the default is 1. More than 1
  353. buffer may be active at any given time.
  354.  
  355. s3 is the field value to be used in the lookup.
  356. To look up the value in the current field, use
  357. $. For the value of another field, use the
  358. other field's name.
  359.  
  360. The Concat function can be used to make up this 
  361. string with the values from other fields on the form 
  362. (e.g.,
  363. Concat(FIELDA,";"FIELDB,";"FIELDC)). If you are
  364. searching on a date field in a Paradox file, the date 
  365. must be supplied in the format MM/DD/YY.
  366.  
  367. s4 is an optional database type, defaulting
  368. to dBASE (DBF). This value must be enclosed in
  369. quotation marks ("DB").  Current options are:
  370.  
  371.    DBF    -    standard dBASE III or IV
  372.    JFD    -    JetForm database format
  373.    DB    -    Paradox format
  374.  
  375. Normally used as a validation rule, DbFetch
  376. returns true (1) if the record is found and
  377. false (0) if not found. This function also
  378. sets up the specified buffer so that the
  379. retrieved data can be used in other fields on
  380. the form via the DbField function.
  381.  
  382. Note that the database file and field names must
  383. be within quotation marks.
  384.  
  385. Refer to Jetform Functions in the Online Help
  386. for more information.
  387.  
  388. Examples:
  389.  
  390. DbFetch ("VENDORS","VENDNO") looks up the
  391. value of the current field in the VENDORS dBASE
  392. file using a sequential search on the VENDNO
  393. field. The result is stored in buffer 1.
  394.  
  395. DbFetch ("PARTS","PARTINDX",2) looks up the
  396. value of the current field in the PARTS dBASE
  397. file, using an indexed search with the PARTINDX
  398. index file. The result is stored in buffer 2,
  399. so that the vendor record and the part record
  400. can both be accessed from other fields in the
  401. current form using the DbField function.
  402.  
  403. DbFetch ("CUSTOMER","CUSTOMRNO",1,$,"DB")
  404. looks up the value of the current field (specified by 
  405. the $) in the CUSTOMRNO Paradox database file.
  406. The result is stored in buffer number 1.
  407.  
  408. Related Functions:
  409.  
  410.     DBField
  411.  
  412. ^Function DbField ([n1], [s1], [s2])
  413.  
  414. Retrieves the value for a field from a database
  415. record previously retrieved via a DbFetch
  416. function.
  417.  
  418. n1 specifies the buffer number where the data is
  419. stored. If not entered, the default is 1.
  420.  
  421. s1 identifies the database field to be
  422. retrieved enclose in quotation marks. If not entered,
  423. the name of the current field is used.
  424.  
  425. s2 is an optional database type, defaulting to
  426. dBASE (DBF). This value must be enclosed in
  427. quotation marks ("DB").  Current options are:
  428.  
  429.    DBF     -    standard dBASE III or IV
  430.    JFD     -    JetForm database format
  431.    DB      -    Paradox format
  432.  
  433. Option is enclosed in quotation marks.
  434. Care should be taken that the specified buffer
  435. number is the same as the buffer number used in
  436. the corresponding DbFetch function call.
  437.  
  438. Examples:
  439.  
  440. DbField( ) (function call for field VENDNAME)
  441. gets the value of the field VENDNAME from the
  442. database record stored in buffer 1.
  443.  
  444. DbField(2,"PARTDESC") (function call for field
  445. ITEMDESC) gets the value of the field PARTDESC
  446. from the database record stored in buffer 2.
  447.  
  448. Related Functions:
  449.  
  450.     DBFetch
  451.  
  452. ^Function SQLFetch(SQL[,connect[,buffer#[,options
  453.     [,prompt1 [...,prompt99]]]]])
  454.  
  455. Allows full access to SQL queries and can
  456. include designer-supplied prompts.
  457.  
  458.  SQL is the required SQL statement.  May contain
  459.  embedded prompts.
  460.  
  461.  connect is the ODBC connection string. Default is 
  462.  "DSN=dBASE".
  463.  
  464.  buffer# is the buffer where the retrieved data is 
  465.  stored. The default is 1.
  466.  
  467.  options is the options string. Use "m" for a dialog 
  468.  box with multiple rows matching query. Default is "".
  469.  
  470.  prompt1,...,prompt99 is a comma separated list of  
  471.  prompts. Each prompt is in the form: 
  472.  
  473.      "name;text;default" 
  474.     
  475.      where name is the name of the prompt, text is the
  476.      prompt text, and default is the default value.
  477.  
  478. Example:
  479.  
  480. SQLFetch(concat("select emp_id from emp where  
  481.  emp_id =",$))
  482.  
  483.  This function retrieves the employee record from 
  484.  the dBASE database emp where the key emp_id equals
  485.  the entered value.
  486.  
  487. Related Functions:
  488.  
  489.     At, Concat, Left, Len, Lower, Ltrim, Oneof,
  490.     Replace, Right, Rtrim, Str, Stuff, Substr,
  491.     Upper, Val, Within, WordNum
  492.  
  493. ^Function SQLField (buffer#[,column name])
  494.  
  495. Retrieves the data from the specified bufffer
  496. that was populated by a SQLFetch function.
  497.  
  498.  buffer# is the buffer number of a previous SQLFetch.
  499.  
  500.  column name is the column name from the    
  501.  SQLFetch used  to retrieve the value. Note that this 
  502.  may be a positional column number starting from 1.
  503.     
  504. Examples:
  505.  
  506. The retrieved data (an employee record) from an 
  507. SQLFetch function has by default been stored in 
  508. buffer 1, using the statement:
  509.  
  510. SQLFetch(concat("select emp_id from emp where 
  511. emp_id =",$),"DSN=dBASE")
  512.  
  513. This statement will retrieve the data from buffer 1:
  514.  
  515. SQLField (1,1)
  516.  
  517. The data is retrieved from buffer 1, starting at column 
  518. 1.
  519.  
  520. Related Functions:
  521.  
  522.     SQLFetch
  523.  
  524. ^category Date and Time
  525. ^Function Cdow ([d1], [n1])
  526.  
  527. Returns the character string for the day of the week 
  528. (Monday, Tuesday, etc.) from a date string.
  529.  
  530. d1 is the date string in the format specified by
  531. the parameter n1. If no d1 parameter is 
  532. specified, the current system date is used.
  533.  
  534. n1 identifies the date format as one of the
  535. following.
  536.  
  537.    1 - YYMMDD
  538.    2 - MM/DD/YY (default value)
  539.    3 - MM-DD-YY
  540.    8 - DD/MM/YY
  541.    9 - DD-MM-YY
  542.  
  543. Examples:
  544.  
  545.   Cdow("17/03/89",8) returns "Friday"
  546.   Cdow("03/18/89") returns "Saturday"
  547.   Cdow("890319",1) returns "Sunday"
  548.   Cdow() returns the day of the week for the
  549.   current system date.
  550.  
  551. Related Functions:
  552.  
  553.     Cmonth, Date2num, DateArith, DateDiff,
  554.     Dow, Month, Num2date, Time, Today, Year
  555.  
  556. ^Function Cmonth ([d1], [n1])
  557.  
  558. Returns the character string for the month 
  559. (January, February, etc.) from a date string.
  560.  
  561. d1 is the date string in the format specified by
  562. the  parameter n1. If no d1 parameter is  
  563. specified, the current system date is used.
  564.  
  565. n1 identifies the date format as one of the
  566. following:
  567.  
  568.    1 - YYMMDD
  569.    2 - MM/DD/YY (default)
  570.    3 - MM-DD-YY
  571.    8 - DD/MM/YY
  572.    9 - DD-MM-YY
  573.  
  574. Examples:
  575.  
  576.   Cmonth ("890201",1) returns "February"
  577.   Cmonth ("03/04/89") returns "March"
  578.   Cmonth ("03/04/89",8) returns "April"
  579.   Cmonth () returns the month for the current
  580.   system date.
  581.  
  582. Related Functions:
  583.  
  584.     Cdow, Date2num, DateArith, DateDiff,
  585.     Dow, Month, Num2date, Time, Today, Year
  586.  
  587. ^Function Date2num ([d1], [n1])
  588.  
  589. Converts a date value to a number. The number
  590. returned is the number of days since January 1, 
  591. 1900.
  592. The function can be used when performing date
  593. validations or as part of a date arithmetic
  594. calculation.
  595.  
  596. d1 is a date string. If d1 is not specified, the
  597. current system date is used.
  598.  
  599. n1 identifies the date format:
  600.  
  601.    1 - YYMMDD
  602.    2 - MM/DD/YY (default)
  603.    3 - MM-DD-YY
  604.    8 - DD/MM/YY
  605.    9 - DD-MM-YY
  606.  
  607. If the date is not valid in the specified
  608. format, then a value of 0 is returned. This 
  609. allows Date2num to be used as a validation
  610. rule to ensure that a valid date is entered.
  611.  
  612. Examples:
  613.  
  614.   Date2num("01/01/00",8) returns 1
  615.   Date2num("03/15/89") returns 32582
  616.   Date2num(FIELDA,1) returns 32583 when the value
  617.   of FIELDA is "890316".
  618.  
  619. The previous examples have limited practical
  620. use when used alone. However the Date2num
  621. function can be extremely useful when combined
  622. with the Num2date function to add dates together.
  623.  
  624. For example, an invoice form may have a field called
  625. TODAYS_DATE that contains the issue date of
  626. the invoice. The payment date is a field called 
  627. PAY_DATE, that is 30 days from the issue date.
  628. The payment date can be calculated automatically
  629. with the Num2date and Date2num functions:
  630.      
  631.      Num2date ( Date2num ( TODAYS_DATE) + 30)
  632.  
  633. This calculation uses Date2num and converts
  634. TODAYS_DATE to a number. The numeric
  635. constant 30 is added to this number. The function
  636. Num2date uses the sum of TODAYS_DATE plus
  637. 30 and converts it from a number back to
  638. recognizable date.
  639.  
  640. Related Functions:
  641.  
  642.     Cdow, Cmonth, DateArith, DateDiff,
  643.     Dow, Month, Num2date, Time, Today, Year
  644.  
  645. ^Function DateArith (d1, n1, n2)
  646.  
  647. This function adds n2 days to the date specified
  648. in d1. 
  649.  
  650.   n1 identifies the date format.
  651.  
  652.   d1 is a date in the format specified by
  653.   n1. The result is a date in the format specified
  654.   by n1.
  655.  
  656. The date format can be one of the following:
  657.  
  658.     1  yymmdd
  659.     2  mm/dd/yy (default)
  660.     3  mm-dd-yy
  661.     8  dd/mm/yy
  662.     9  dd-mm-yy
  663.  
  664. Example:
  665.  
  666.      DateArith(Today(3),3,JF02)
  667.  
  668. Takes today's date in mm-dd-yy format, adds the
  669. number in field JF02, and returns a date in
  670. mm-dd-yy format.
  671.  
  672. Note that if the number in field JF02 is
  673. negative, the date returned is a date in the
  674. past.
  675.  
  676. Related Functions:
  677.  
  678.     Cdow, Cmonth, Date2num, DateDiff,
  679.     Dow, Month, Num2date, Time, Today, Year
  680.  
  681. ^Function DateDiff (d1, n1, d2, [n2])
  682.  
  683. This function computes the number of days
  684. difference between d1 and d2.
  685.  
  686. n1 identifies the date format. d1 is a date in the
  687. format specified by n1. d2 is a date in the format
  688. specified by n2 if n2 exists, or in the format specified 
  689. by n1 if n2 does not exist.
  690.  
  691. The date format can be one of the following:
  692.  
  693.     1  yymmdd
  694.     2  mm/dd/yy (default)
  695.     3  mm-dd-yy
  696.     8  dd/mm/yy
  697.     9  dd-mm-yy
  698.  
  699. Example:
  700.  
  701.         DateDiff(JF05,2,JF07,3)
  702.  
  703. Takes a date in mm/dd/yy format from field JF05,
  704. and a date in mm-dd-yy format from field JF07,
  705. and returns the difference between the two
  706. dates.
  707.  
  708. Related Functions:
  709.  
  710.     Cdow, Cmonth, Date2num, DateArith, 
  711.     Dow, Month, Num2date, Time, Today, Year
  712.  
  713. ^Function Dow ([d1], [n1])
  714.  
  715. Returns the number of the day of the week where
  716. 0 is Sunday, 1 is Monday, etc.
  717.  
  718. d1 is the date string in the format specified by
  719. the parameter n1. If no d1 parameter is
  720. specified, the current system date is used.
  721.  
  722. n1 identifies the date format as one of the
  723. following:
  724.  
  725.    1 - YYMMDD
  726.    2 - MM/DD/YY (default)
  727.    3 - MM-DD-YY
  728.    8 - DD/MM/YY
  729.    9 - DD-MM-YY
  730.  
  731. Examples:
  732.  
  733.   Dow("17/03/89",8) returns 5
  734.   Dow("03/18/89") returns 6
  735.   Dow ("890319",1) returns 0
  736.   Dow () returns the day of the week for the
  737.   current system date.
  738.  
  739. Related Functions:
  740.  
  741.     Cdow, Cmonth, Date2num, DateArith, DateDiff,
  742.     Month, Num2date, Time, Today, Year
  743.  
  744. ^Function Month ([d1], [n1])
  745.  
  746. Returns the month number (1, 2, 3, etc.) for a
  747. date string.
  748.  
  749. d1 is the date string in the format specified by
  750. the parameter n1. If no d1 parameter is 
  751. specified, the current system date is used.
  752. If you use a field name for this parameter, do
  753. not enclose it in quotation marks.
  754.  
  755. n1 identifies the date format as one of the
  756. following.
  757.  
  758.    1 - YYMMDD
  759.    2 - MM/DD/YY (default)
  760.    3 - MM-DD-YY
  761.    8 - DD/MM/YY
  762.    9 - DD-MM-YY
  763.  
  764. Examples:
  765.  
  766.   Month("890201",1) returns 2
  767.   Month("03/04/89") returns 3
  768.   Month("03/04/89") returns 4
  769.   Month(DATE,3) returns 8 when DATE is a field with
  770.   a current value of 08-29-91.
  771.   Month() returns the month number for the current
  772.   system date.
  773.  
  774. Related Functions:
  775.  
  776.     Cdow, Cmonth, Date2num, DateArith, DateDiff,
  777.     Dow, Num2date, Time, Today, Year
  778.  
  779. ^Function Num2date (n1, [n2])
  780.  
  781. Converts a number to a date. The number used
  782. is the number of days since January 1, 1900.
  783.  
  784. n1 is the number to be evaluated. The date
  785. returned is in the format specified by n2.
  786.  
  787. n2 identifies the date format as one of the
  788. following.
  789.  
  790.    1  - yymmdd
  791.    2  - mm/dd/yy (default)
  792.    3  - mm-dd-yy
  793.    4  - Mmm dd, yyyy
  794.    5  - Mmm..m dd, yyyy
  795.    6  - dd Mmm yy
  796.    7  - dd Mmm yyyy
  797.    8  - dd/mm/yy
  798.    9  - dd-mm-yy
  799.    10 - mmm dd, yyy
  800.    11 - m..m dd, yyyy
  801.    12 - dd mmm yy
  802.    13 - dd mmm yyyy
  803.  
  804. Note that formats 10 to 13 inclusive use French
  805. month names.
  806.  
  807. This function can be used in conjunction with
  808. the Date2num function to perform date
  809. arithmetic.
  810.  
  811. Examples:
  812.  
  813.   Num2date(1,8) returns "01/01/00"
  814.   Num2date(2,1) returns "000102"
  815.   Num2date(32582) returns "03/15/89"
  816.  
  817. To calculate the date 10 days after the date entered
  818. in the field PODATE, use the following calculation 
  819. rule:
  820.  
  821.   Num2date(Date2num(PODATE)+10)
  822.  
  823. Related Functions:
  824.  
  825.     Cdow, Cmonth, Date2num, DateArith, DateDiff,
  826.     Dow, Month, Time, Today, Year
  827.  
  828. ^Function Time ()
  829.  
  830. Returns the current system time as "hh:mm:ss"
  831. based on a 24-hour clock.
  832.  
  833. Related Functions:
  834.  
  835.     Cdow, Cmonth, Date2num, Dow, Month, 
  836.     Num2date, Today, Year
  837.  
  838. ^Function Today ([n1])
  839.  
  840. Returns the current system date.
  841.  
  842. n1 identifies the date format as one of the
  843. following:
  844.  
  845.    1  - yymmdd
  846.    2  - mm/dd/yy (default)
  847.    3  - mm-dd-yy
  848.    4  - Mmm dd, yyyy
  849.    5  - Mmm..m dd, yyyy
  850.    6  - dd Mmm yy
  851.    7  - dd Mmm yyyy
  852.    8  - dd/mm/yy
  853.    9  - dd-mm-yy
  854.    10 - mmm dd, yyy
  855.    11 - m..m dd, yyyy
  856.    12 - dd mmm yy
  857.    13 - dd mmm yyyy
  858.  
  859. Note that formats 10 to 13 inclusive use French
  860. month names.
  861.  
  862. Related Functions:
  863.  
  864.     Cdow, Cmonth, Date2num, Dow, Month, 
  865.     Num2date, Time, Year
  866.  
  867. ^Function Year ([d1], [n1])
  868.  
  869. Returns the year for a given date.
  870.  
  871. d1 is the date to be evaluated. If not
  872. specified, the current system date is used.
  873.  
  874. n1 identifies the date format as one of the
  875. following.
  876.  
  877.    1 - YYMMDD
  878.    2 - MM/DD/YY (default)
  879.    3 - MM-DD-YY
  880.    8 - DD/MM/YY
  881.    9 - DD-MM-YY
  882.  
  883. Examples:
  884.  
  885.   Year() returns "1991"
  886.   Year("880803",1) returns "1988"
  887.   Year("03/08/45",8) returns "1945"
  888.   Year() returns the year for the current system
  889.   date.
  890.  
  891. Related Functions:
  892.  
  893.     Cdow, Cmonth, Date2num, DateArith, DateDiff,
  894.     Dow, Month, Num2date, Time, Today
  895.  
  896. ^category Filler Environment
  897. ^Function Data ()
  898.  
  899. Returns the fully qualified DOS file name of the
  900. current data file. No parameters are required. A string
  901. containing the name of the current data file is
  902. returned.
  903.  
  904. Related Functions:
  905.  
  906.     DocVar, Form, Getenv, GetProfile,
  907.     Info, SetProfile, Version
  908.  
  909. ^Function DocVar (s1)
  910.  
  911. Returns the Form Documentation variable value from 
  912. the JFDESIGN.INI file, if the Form Documentation 
  913. section of the file has been set.
  914.  
  915. s1 is the variable name from the JFDESIGN.INI file,
  916. which may be one of:
  917.  
  918.      FormName
  919.      Description
  920.      Designer
  921.      Contact
  922.      CreationDate
  923.      CustomName
  924.      CustomValue
  925.      Version
  926.      VersionDate
  927.      MessageType
  928.  
  929. Examples:
  930.  
  931.   DocVar(FormName) returns "Fax_Form"
  932.   DocVar(Designer) returns "J. Smith Accounting"
  933.  
  934. Related Functions:
  935.  
  936.     Data, Form, Getenv, GetProfile,
  937.     Info, SetProfile, Version
  938.  
  939. ^Function Form ()
  940.  
  941. Returns the name of the current form file. No
  942. parameters are required.
  943.  
  944. Related Functions:
  945.  
  946.     Data, DocVar, Getenv, GetProfile,
  947.     Info, SetProfile, Version
  948.  
  949. ^Function Getenv (s1)
  950.  
  951. Returns the current value of the string for a specified
  952. DOS environment variable.
  953.  
  954. s1 is the environment variable name, which must be
  955. enclosed in quotation marks..
  956.  
  957. Example:
  958.  
  959. If before running JetForm Filler the following DOS
  960. commands are executed:
  961.  
  962.   SET ENVA="AAA"
  963.   SET ENVB=99
  964.  
  965. This sets values for the environment variables ENVA
  966. and ENVB.
  967.  
  968.   Getenv("ENVA") will return "AAA".
  969.   Getenv("ENVB") will return 99.
  970.  
  971. This function can be used, for example, with the
  972. If function to modify a calculation based on a
  973. value set up in a DOS environment variable.
  974.  
  975. Related Functions:
  976.  
  977.     Data, DocVar, Form, GetProfile,
  978.     Info, SetProfile, Version
  979.  
  980. ^Function GetProfile (KeyWord, [Section], [File])
  981.  
  982. This function gets a value from a Windows .INI file. 
  983. If no Section is specified, the function uses
  984. the [User] section of the .INI file. If no File is 
  985. specified,  the function defaults to JFILLER.INI if the 
  986. form is being filled in JetForm Filler.
  987.  
  988. Example:
  989.  
  990.     GetProfile("ExePath","Paths","JFILLER.INI)
  991.  
  992. returns the path where JetForm Filler expects
  993. to find program files.
  994.  
  995. Related Functions:
  996.  
  997.     Data, DocVar, Form, Getenv,
  998.     Info, SetProfile, Version
  999.  
  1000. ^Function Info (n1, [s1], [n2])
  1001.  
  1002. Returns internal field and form related data.
  1003.  
  1004. n1 is an option code, specifying which data is
  1005. returned. Refer to the table below.
  1006.  
  1007. s1 is an option string. It represents a field name
  1008. If it is not specified, the current field is used.
  1009.  
  1010. n2 is an optional numeric value. It represents
  1011. a field occurrence number. If it is not specified, 
  1012. the first occurrence of the named field is used.
  1013.  
  1014. Option Codes for n1
  1015.  
  1016.  1    return the field name
  1017.  2    return the occurrence number of the field 
  1018.      on the page
  1019.  3    return the number of occurrences of the
  1020.      field name which are on the current page
  1021.  4    return the field tabbing sequence number
  1022.      (The order in which the fields are
  1023.       prompted.)
  1024.  5    return the error message text for the field
  1025.  6    return the help text for the field
  1026.  7    return the number of characters for the
  1027.      field
  1028.  8    return the number of lines for the field
  1029.  
  1030. Option Codes 100 - 199 are general, non-field
  1031. related. If used, parameters s1 and n2 are ignored.
  1032.  
  1033.  101    return the page number within the
  1034.      document that is being processed
  1035.  102    return the total number of pages in the
  1036.      document
  1037.  103    return the current data record that is being 
  1038.      processed
  1039.  104    return the total number of records in the
  1040.      current data file
  1041.  105    return the full file name of the compiled
  1042.      form (MDF) being processed
  1043.  106    return the logical Form Name of the 
  1044.      compiled form
  1045.  107    return the Form Description of the compiled 
  1046.      form
  1047.  
  1048. Related Functions:
  1049.  
  1050.     Data, DocVar, Form, Getenv, GetProfile,
  1051.     SetProfile, Version
  1052.  
  1053. ^Function SetProfile (String,KeyWord,[Section],[File])
  1054.  
  1055. This function sets a value in a Windows .INI file.
  1056. String is the value to be inserted to the right of the
  1057. equal sign. KeyWord is the word on the left side 
  1058. of the .INI file, equal sign.  Section is the word in 
  1059. square brackets [] in the .INI file. If no section is 
  1060. specified, the function uses the [User] section of the 
  1061. .INI file. If no File is specified, the function uses 
  1062. JFILLER.INI to specify that the form is being filled in 
  1063. JetForm Filler.
  1064.  
  1065. For example:
  1066. When running JetForm Filler, the function:
  1067.  
  1068.        SetProfile("c:\demo","ExePath","Paths")
  1069.  
  1070. accesses JFILLER.INI and sets the path where
  1071. JetForm Filler expects to find program files.
  1072.  
  1073. Related Functions:
  1074.  
  1075.     Data, DocVar, Form, Getenv, GetProfile,
  1076.     Info, Version
  1077.  
  1078. ^Function Version ()
  1079.  
  1080. Returns the current JetForm version number.
  1081.  
  1082. Example:
  1083.  
  1084. Version( ) returns "Version 4.00 (B5)".
  1085.  
  1086. Related Functions:
  1087.  
  1088.     Data, DocVar, Form, Getenv, GetProfile,
  1089.     Info, SetProfile
  1090.  
  1091.  
  1092. ^category Field Control and Manipulation
  1093. ^Function Access ([f1], [n1], [n2])
  1094.  
  1095. Returns the value of a given field as a
  1096. character string.
  1097.  
  1098. f1 is the name of the field. 
  1099.  
  1100. n1 is the record number in the data file. The
  1101. default is 0, the current record. Negative values
  1102. select relative to the current record: -1 selects 
  1103. the previous record, +1 selects the next record.
  1104. Note that if the + and - signs are omitted,
  1105. JetForm uses n1 as an absolute record number.
  1106. For example, if n1 is 4 then JetForm will 
  1107. reference the fourth record in the data file.
  1108.  
  1109. n2 is the field occurrence number in the record.
  1110. The default is the first occurrence, 1. If the field
  1111. occurs more than once in the record, n2 identifies
  1112. the occurrence to fetch. 1 indicates the first 
  1113. occurrence, 2 the second occurrence, and so on.
  1114.  
  1115. If you are referring to fields on the current page of 
  1116. a form for the current record, you do not need to 
  1117. use the ACCESS function because you can 
  1118. reference the field directly.
  1119.  
  1120. Examples:
  1121.  
  1122. Access("FIELDA",-1) gets the value of FIELDA
  1123. from the previous record in the data file.
  1124.  
  1125. Access("PONO") gets the value of PONO from the
  1126. current record, maybe from the previous page on
  1127. the form.
  1128.  
  1129. Access("FIELDB",-1,3) gets the value of third 
  1130. occurrence of the FIELDB from the previous record in 
  1131. the data file.
  1132.  
  1133. Access("FIELDC",4,1) gets the value of first 
  1134. occurrence of FIELDB from the fourth record in the 
  1135. data file.
  1136.  
  1137. Access("Number",-1) + 1 gets the value of NUMBER 
  1138. from the previous record and adds 1 to it. This
  1139. would be useful to automatically increment a numeric
  1140. field from record to record.
  1141.  
  1142. Related Functions:
  1143.  
  1144.     Abs, Ceiling, Count, Exp, Floor, Max, Min, Mod
  1145.     Pi, Round, SerialNum, Sqrt, Sum
  1146.  
  1147. ^Function Command (s1)
  1148.  
  1149. Executes a JetForm Filler command, identified by its 
  1150. menu text string. Command returns 1 if the command 
  1151. is a valid command name, and 0 if the command is 
  1152. not a valid command name. This function is intended 
  1153. for use with Action Button fields.
  1154.  
  1155. s1 represents a valid JetForm Filler menu/command 
  1156. enclosed in quotation marks. or a field name 
  1157. containing the command. Except for case and 
  1158. accelerator underlining you must provide the 
  1159. command exactly as it appears on the Filler menu, 
  1160. including ellipsis ("file/print..."). Menu is optional and 
  1161. is required only when using ambigous (duplicate) 
  1162. command names.
  1163.  
  1164. All JetForm Filler commands are available. If a 
  1165. command name appears multiple times in JetForm 
  1166. Filler (Delete), the first instance takes precedence 
  1167. unless it is qualified with the menu name. If the 
  1168. command is not currently enabled, the request is 
  1169. ignored.
  1170.  
  1171. Example:
  1172.  
  1173. Command ("JetNotes/Delete")
  1174.  
  1175. Related Functions:
  1176.  
  1177.     SetValue, SetLabel
  1178.  
  1179. ^Function GetMandatory (field)
  1180.  
  1181. Returns a numeric value indicating if the designated 
  1182. field has been specified as a mandatory field, which 
  1183. must be completed at data entry. The return values 
  1184. are:
  1185.         0 = Off
  1186.         1 = On
  1187.  
  1188. Fields are identified by field name, enclosed in
  1189. quotation marks. Any field name may have an
  1190. an occurrence number appended to it. The following
  1191. formats are supported:
  1192.  
  1193.     JF01[2]      - Second occurrence of field JF01.
  1194.     JF02[-1]     - Previous occurrence of field JF02.
  1195.     JF03[+1]     - Next occurrence of field JF03.
  1196.     JF04[*]      - All occurrences of field JF04.
  1197.  
  1198. Example:
  1199.  
  1200. GetMandatory("JF01[1]")
  1201.  
  1202. Returns the status of the mandatory
  1203. attribute for the first occurrence of field JF01.
  1204. If the field is designated as mandatory, the 
  1205. function returns 1. If not, the function returns 0.
  1206.  
  1207. Related Functions:
  1208.  
  1209.     Access, GetMessage, GetNumeric, 
  1210.     GetOverride, GetProtect, GetValue, GetVisible,
  1211.     GetWarning, LockFields, ResetOverride, 
  1212.     SetMandatory,     SetMessage, SetNumeric, 
  1213.     SetOverride, SetProtect, SetValue, SetVisible, 
  1214.     SetWarning
  1215.  
  1216. ^Function GetMessage (field)
  1217.  
  1218. Returns the custom error message text for the
  1219. designated field.
  1220.  
  1221. Fields are identified by field name, enclosed in
  1222. quotation marks. Any field name may have an
  1223. occurrence number appended to it. The following
  1224. formats are supported:
  1225.  
  1226.     JF01[2]      - Second occurrence of field JF01.
  1227.     JF02[-1]     - Previous occurrence of field JF02.
  1228.     JF03[+1]     - Next occurrence of field JF03.
  1229.     JF04[*]      - All occurrences of field JF04.
  1230.  
  1231. Example:
  1232.  
  1233. GetMessage("JF01[1]")
  1234.  
  1235. Returns the custom error message text
  1236. for the first occurrence of field JF01.
  1237.  
  1238. Related Functions:
  1239.  
  1240.     Access, GetMandatory, GetNumeric, 
  1241.     GetOverride, GetProtect, GetValue, GetVisible,
  1242.     GetWarning, LockFields, ResetOverride, 
  1243.     SetMandatory, SetMessage, SetNumeric, 
  1244.     SetOverride, SetProtect, SetValue, SetVisible, 
  1245.     SetWarning
  1246.  
  1247. ^Function GetNumeric (field)
  1248.  
  1249. Returns a numeric value indicating if the designated
  1250. field has been specified as a numeric field, which 
  1251. must be filled with numeric data. The return values 
  1252. are:
  1253.         0 = Off (field is not numeric)
  1254.         1 = On (field is numeric)
  1255.  
  1256. Fields are identified by field name, enclosed in
  1257. quotation marks. Any field name may have an
  1258. occurrence number appended to it. The following
  1259. formats are supported:
  1260.  
  1261.     JF01[2]      - Second occurrence of field JF01.
  1262.     JF02[-1]     - Previous occurrence of field JF02.
  1263.     JF03[+1]     - Next occurrence of field JF03.
  1264.     JF04[*]      - All occurrences of field JF04.
  1265.  
  1266. Example:
  1267.  
  1268. GetNumeric("JF01[1]")
  1269.  
  1270. Returns the status of the numeric attribute
  1271. for the first occurrence of field JF01. If the field 
  1272. is designated as numeric, the value 1 is returned. 
  1273. If not, the value 0 is returned.
  1274.  
  1275. Related Functions:
  1276.  
  1277.     Access, GetMandatory, GetMessage,  
  1278.     GetOverride, GetProtect, GetValue, GetVisible,
  1279.     GetWarning, LockFields, ResetOverride, 
  1280.     SetMandatory, SetMessage, SetNumeric, 
  1281.     SetOverride, SetProtect, SetValue, SetVisible, 
  1282.     SetWarning
  1283.  
  1284. ^Function GetOverride (field)
  1285.  
  1286. Returns a numeric value indicating whether the
  1287. designated field has a calculation that can be
  1288. overridden during data entry. The return values
  1289. are:
  1290.         0 = Off (no override permitted)
  1291.         1 = On (override permitted)
  1292.  
  1293. Fields are identified by field name, enclosed in
  1294. quotation marks. Any field name may have an
  1295. occurrence number appended to it. The following
  1296. formats are supported:
  1297.  
  1298.     JF01[2]      - Second occurrence of field JF01.
  1299.     JF02[-1]     - Previous occurrence of field JF02.
  1300.     JF03[+1]     - Next occurrence of field JF03.
  1301.     JF04[*]      - All occurrences of field JF04.
  1302.  
  1303. Example:
  1304.  
  1305. GetOverride("JF01[1]")
  1306.  
  1307. This returns the status of the calculation override
  1308. attribute for the first occurrence of field JF01. If 
  1309. the field has a calculation that can be overridden at 
  1310. data entry, the value 1 is returned. If not, 0 is 
  1311. returned.
  1312.  
  1313. Related Functions:
  1314.  
  1315.     Access, GetMandatory, GetMessage, GetNumeric, 
  1316.     GetProtect, GetValue, GetVisible, GetWarning
  1317.     LockFields, ResetOverride, SetMandatory,
  1318.     SetMessage, SetNumeric, SetOverride, SetProtect,
  1319.     SetValue, SetVisible, SetWarning
  1320.  
  1321. ^Function GetProtect (field)
  1322.  
  1323. Returns a numeric value indicating if the designated
  1324. field is specified as a protected field which cannot 
  1325. be entered during data entry. The return values are:
  1326.         0 = Off (field not protected)
  1327.         1 = On (field is protected)
  1328.  
  1329. Fields are identified by field name, enclosed in
  1330. quotation marks. Any field name may have an
  1331. occurrence number appended to it. The following
  1332. formats are supported:
  1333.  
  1334.     JF01[2]      - Second occurrence of field JF01.
  1335.     JF02[-1]     - Previous occurrence of field JF02.
  1336.     JF03[+1]     - Next occurrence of field JF03.
  1337.     JF04[*]      - All occurrences of field JF04.
  1338.  
  1339. Example:
  1340.  
  1341. GetProtect("JF01[1]")
  1342.  
  1343. This returns the status of the protected attribute
  1344. for the first occurrence of field JF01. If the field is 
  1345. designated as a protected field, the value 1 is 
  1346. returned. If not, the value 0 is returned.
  1347.  
  1348. Related Functions:
  1349.  
  1350.     Access, GetMandatory, GetMessage, GetNumeric, 
  1351.     GetOverride, GetValue, GetVisible, GetWarning,
  1352.     LockFields, ResetOverride, SetMandatory,
  1353.     SetMessage, SetNumeric, SetOverride, SetProtect,
  1354.     SetValue, SetVisible, SetWarning
  1355.  
  1356. ^Function GetValue (field)
  1357.  
  1358. Returns the current value of the designated
  1359. field.
  1360.  
  1361. Fields are identified by field name, enclosed
  1362. in quotation marks. Any field name may have
  1363. an occurrence number appended to it. The
  1364. following formats are supported:
  1365.  
  1366.     JF01[2]      - Second occurrence of field JF01.
  1367.     JF02[-1]     - Previous occurrence of field JF02.
  1368.     JF03[+1]     - Next occurrence of field JF03.
  1369.     JF04[*]      - All occurrences of field JF04.
  1370.  
  1371. Example:
  1372.  
  1373. GetValue("JF01[-1]")
  1374.  
  1375. This returns the current value of the previous
  1376. occurrence of field JF01.
  1377.  
  1378. Related Functions:
  1379.  
  1380.     Access, GetMandatory, GetMessage, GetNumeric, 
  1381.     GetOverride, GetProtect, GetVisible, GetWarning,
  1382.     LockFields, ResetOverride, SetMandatory,
  1383.     SetMessage, SetNumeric, SetOverride, SetProtect,
  1384.     SetValue, SetVisible, SetWarning
  1385.  
  1386. ^Function GetVisible (field)
  1387.  
  1388. Returns a numeric value indicating if the designated
  1389. field is a visible field. The return values are:
  1390.  
  1391.         0 = Off (field is not visible)
  1392.         1 = On (field is visible)
  1393.  
  1394. Fields are identified by the field name, enclosed
  1395. in quotation marks. Any field name may have
  1396. an occurrence number appended to it. The
  1397. following formats are supported:
  1398.  
  1399.     JF01[2]      - Second occurrence of field JF01.
  1400.     JF02[-1]     - Previous occurrence of field JF02.
  1401.     JF03[+1]     - Next occurrence of field JF03.
  1402.     JF04[*]      - All occurrences of field JF04.
  1403.  
  1404. Example:
  1405.  
  1406. GetVisible("JF01[1]")
  1407.  
  1408. If the first occurrence of field JF01 has been
  1409. designated as visible, the value 1 is
  1410. returned. If not the value 0 is returned.
  1411.  
  1412. Related Functions:
  1413.  
  1414.     Access, GetMandatory, GetMessage, GetNumeric, 
  1415.     GetOverride, GetProtect, GetValue, GetWarning,
  1416.     LockFields, ResetOverride, SetMandatory,
  1417.     SetMessage, SetNumeric, SetOverride, SetProtect,
  1418.     SetValue, SetVisible, SetWarning
  1419.  
  1420. ^Function GetWarning (field)
  1421.  
  1422. Returns a numeric value indicating if the designated
  1423. field is specified as displaying a warning if left empty 
  1424. during data entry. The return values are:
  1425.         0 = Off (No warning issued)
  1426.         1 = On (Warning displays)
  1427.  
  1428. Fields are identified by field name, enclosed
  1429. in quotation marks. Any field name may have
  1430. an occurrence number appended to it. The
  1431. following formats are supported:
  1432.  
  1433.     JF01[2]      - Second occurrence of field JF01.
  1434.     JF02[-1]     - Previous occurrence of field JF02.
  1435.     JF03[+1]     - Next occurrence of field JF03.
  1436.     JF04[*]      - All occurrences of field JF04.
  1437.  
  1438. Example:
  1439.  
  1440. GetWarning("JF01[1]")
  1441.  
  1442. This returns the status of the "warn if empty"
  1443. attribute for the first occurrence of field JF01. 
  1444. If the field has been designated as warn if empty, 
  1445. the value 1 is returned. If not, 0 is returned.
  1446.  
  1447. Related Functions:
  1448.  
  1449.     Access, GetMandatory, GetMessage, GetNumeric, 
  1450.     GetOverride, GetProtect, GetValue, GetVisible,
  1451.     LockFields, ResetOverride, SetMandatory,
  1452.     SetMessage, SetNumeric, SetOverride, SetProtect,
  1453.     SetValue, SetVisible, SetWarning
  1454.  
  1455. ^Function LockFields (n1, "f1", ..., "f99")
  1456.  
  1457. Specifies the locked fields for a Signature field. This 
  1458. calculation is created internally for electronic 
  1459. signature 
  1460. fields when the Lock Fields option is selected.
  1461.  
  1462. n1 identifies the display options from the Signature
  1463. field, 
  1464.       1 for Unique Id, 
  1465.       2 for Signature Text
  1466.       3 for Additional Information.
  1467.  
  1468. f1 to f99 are the field names for the Lock Fields. 
  1469. The field names must be enclosed in quotation 
  1470. marks and separated by commas.
  1471.  
  1472. Examples:
  1473.  
  1474. LockFields(2,"FIELDA","FIELDB","FIELDC")
  1475.  
  1476. specifies that the Signature field value displayed is 
  1477. the Signature Text, and the locked fields are FIELDA, 
  1478. FIELDB, and FIELDC.
  1479.  
  1480. Related Functions:
  1481.  
  1482.     Access, GetMandatory, GetMessage, GetNumeric, 
  1483.     GetOverride, GetProtect, GetValue, GetVisible,
  1484.     GetWarning, ResetOverride, SetMandatory,
  1485.     SetMessage, SetNumeric, SetOverride, SetProtect,
  1486.     SetValue, SetVisible, SetWarning
  1487.  
  1488. ^Function ResetOverride (f1, f2, f3, ..., f99)
  1489.  
  1490. Resets the flag indicating that the specified calculated
  1491. fields have been overridden by the user.
  1492.  
  1493. f1 ... f99 are the affected fields.
  1494.  
  1495. The fields are identified by field name, enclosed in
  1496. quotation marks. Any field name may have an 
  1497. occurrence number appended to it. The following 
  1498. formats are supported:
  1499.  
  1500.     JF01[2]      - Second occurrence of field JF01.
  1501.     JF02[-1]    - Previous occurrence of field JF02.
  1502.     JF03[+1]     - Next occurrence of field JF03.
  1503.     JF04[*]      - All occurrences of field JF04.
  1504.  
  1505. Example:
  1506.  
  1507. ResetOverride("JF01[2]", "JF04[*]")
  1508.  
  1509. This resets on the override flag for the second
  1510. occurrence of field JF01 and all occurrences
  1511. of field JF04.
  1512.  
  1513. Related Functions:
  1514.  
  1515.     Access, GetMandatory, GetMessage, GetNumeric, 
  1516.     GetOverride, GetProtect, GetValue, GetVisible,
  1517.     GetWarning, LockFields, SetMandatory,
  1518.     SetMessage, SetNumeric, SetOverride, SetProtect,
  1519.     SetValue, SetVisible, SetWarning
  1520.  
  1521. ^Function SetNumeric (n1, f1, f2, f3,  ..., f99)
  1522.  
  1523. Sets the specified fields to require numeric data
  1524. as indicated by the value of the first parameter.
  1525.  
  1526. n1 is the setting (zero = off, non-zero = on)
  1527. f1 ... f99 are the affected fields.
  1528.  
  1529. The fields are identified by field name, enclosed
  1530. in quotation marks.  Any field name may have an
  1531. occurrence number appended to it. The following 
  1532. formats are supported:
  1533.  
  1534.     JF01[2]      - Second occurrence of field JF01.
  1535.     JF02[-1]     - Previous occurrence of field JF02.
  1536.     JF03[+1]     - Next occurrence of field JF03.
  1537.     JF04[*]      - All occurrences of field JF04.
  1538.  
  1539.  
  1540. Example:
  1541.  
  1542. SetNumeric(1, "JF01[*]")
  1543.  
  1544. This makes all occurrences of JF01 numeric
  1545. fields.
  1546.  
  1547. Related Functions:
  1548.  
  1549.     Access, GetMandatory, GetMessage, GetNumeric, 
  1550.     GetOverride, GetProtect, GetValue, GetVisible,
  1551.     GetWarning, LockFields, ResetOverride, 
  1552.     SetMandatory, SetMessage, SetOverride, 
  1553.     SetProtect, SetValue,  SetVisible, SetWarning
  1554.  
  1555. ^Function SetLabel (s1, f1, f2, f3, ..., f99)
  1556.  
  1557. Dynamically changes the label on an Action Button.
  1558.  
  1559. s1 is the label string for the button.
  1560.  
  1561. f1, f2, f3 identify the affected fields.
  1562.  
  1563. Note that the label string and field names must be 
  1564. enclosed in quotation marks. Any field name may 
  1565. have an occurrenct number appended to it. The 
  1566. following formats are supported:
  1567.  
  1568.     JF01[2]      - Second occurrence of field JF01.
  1569.     JF02[-1]     - Previous occurrence of field JF02.
  1570.     JF03[+1]     - Next occurrence of field JF03.
  1571.     JF04[*]      - All occurrences of field JF04.
  1572.  
  1573. Example:
  1574.  
  1575. SetLabel ("Print...", "Done_Button")
  1576.  
  1577. Related Functions:
  1578.  
  1579.  SetValue
  1580.  
  1581. ^Function SetMandatory (n1, f2, f3, ..., f99)
  1582.  
  1583. Sets the specified fields to be mandatory
  1584. when value for n1 is non-zero.
  1585.  
  1586. n1 is the setting (zero = off, non-zero = on)
  1587. f1 ... f99 are the affected fields.
  1588.  
  1589. The fields are identified by field name, enclosed
  1590. in quotation marks.  Any field name may have an
  1591. occurrence number appended to it. The following
  1592. formats are supported:
  1593.  
  1594.     JF01[2]      - Second occurrence of field JF01.
  1595.     JF02[-1]     - Previous occurrence of field JF02.
  1596.     JF03[+1]     - Next occurrence of field JF03.
  1597.     JF04[*]      - All occurrences of field JF04.
  1598.  
  1599. Example:
  1600.  
  1601. SetMandatory(1, "JF01[2]")
  1602.  
  1603. This makes the second occurrence of JF01 a
  1604. mandatory field which must have a value entered.
  1605.  
  1606. Related Functions:
  1607.  
  1608.     Access, GetMandatory, GetMessage, GetNumeric, 
  1609.     GetOverride, GetProtect, GetValue, GetVisible,
  1610.     GetWarning, LockFields, ResetOverride,  
  1611.     SetMessage, SetNumeric, SetOverride, SetProtect, 
  1612.     SetValue, SetVisible, SetWarning
  1613.  
  1614. ^Function SetMessage (s1, f1, f2, f3,  ..., [f99])
  1615.  
  1616. Changes the error message text for the specified
  1617. fields. This text replaces any message text already
  1618. defined for the fields.
  1619.  
  1620. s1 is the new message text.
  1621.  
  1622. f1 ... f99 are the affected fields.
  1623.  
  1624. The fields are identified by field name, enclosed in
  1625. quotation marks.  Any field name may have an 
  1626. occurrence number appended to it. The following 
  1627. formats are supported:
  1628.  
  1629.     JF01[2]      - Second occurrence of field JF01.
  1630.     JF02[-1]     - Previous occurrence of field JF02.
  1631.     JF03[+1]     - Next occurrence of field JF03.
  1632.     JF04[*]      - All occurrences of field JF04.
  1633.  
  1634. Example:
  1635.  
  1636. SetMessage("Contact System Manager,"JF01[*]")
  1637.  
  1638. This changes the custom error message for all
  1639. occurrences of field JF01.
  1640.  
  1641. Related Functions:
  1642.  
  1643.     Access, GetMandatory, GetMessage, GetNumeric, 
  1644.     GetOverride, GetProtect, GetValue, GetVisible,
  1645.     GetWarning, LockFields, ResetOverride, 
  1646.     SetMandatory, SetNumeric, SetOverride, 
  1647.     SetProtect, SetValue, SetVisible, SetWarning
  1648.  
  1649. ^Function SetOverride (n1, "f1", "f2", "f3", ..., "f99")
  1650.  
  1651. Switches on or off the ability to override
  1652. calculations in designated fields.
  1653.  
  1654. n1 is the setting. 
  1655.  
  1656. Non-zero value switches on the
  1657. ability to override the calculation. A zero value 
  1658. switches off the ability to override the calculation.
  1659.  
  1660. f1 ... f99 are the affected fields.
  1661.  
  1662. The fields are identified by field name, enclosed
  1663. in quotation marks.  Any field name may have an
  1664. occurrence number appended to it. The following
  1665. formats are supported:
  1666.  
  1667.     JF01[2]      - Second occurrence of field JF01.
  1668.     JF02[-1]     - Previous occurrence of field JF02.
  1669.     JF03[+1]     - Next occurrence of field JF03.
  1670.     JF04[*]      - All occurrences of field JF04.
  1671.  
  1672. Example:
  1673.  
  1674. SetOverride(0, "JF01[*]", "JF05[+2]")
  1675.  
  1676. A zero value toggles off the ability to override the
  1677. calculations in all occurrences of field JF01, and
  1678. in the next occurrence of field JF05.
  1679.  
  1680. Related Functions:
  1681.  
  1682.     Access, GetMandatory, GetMessage, GetNumeric, 
  1683.     GetOverride, GetProtect, GetValue, GetVisible,
  1684.     GetWarning, LockFields, ResetOverride, 
  1685.     SetMandatory, SetMessage, SetNumeric, 
  1686.     SetProtect, SetValue, SetVisible, SetWarning
  1687.  
  1688. ^Function SetProtect (n1, "f1","f2","f3", ..., "f99")
  1689.  
  1690. Switches on or off the protected attribute
  1691. for the designated fields.
  1692.  
  1693. n1 is the setting (zero = off, non-zero = on).
  1694. f1 ... f99 are the affected fields.
  1695.  
  1696. The fields are identified by field name, enclosed in
  1697. quotation marks.  Any field name may have an
  1698. occurrence number appended to it. The following
  1699. formats are supported:
  1700.  
  1701.     JF01[2]      - Second occurrence of field JF01.
  1702.     JF02[-1]     - Previous occurrence of field JF02.
  1703.     JF03[+1]     - Next occurrence of field JF03.
  1704.     JF04[*]      - All occurrences of field JF04.
  1705.  
  1706. Example:
  1707.  
  1708. SetProtect(1, "JF01[-1]")
  1709.  
  1710. This makes the previous occurrence of field
  1711. JF01 a protected field.
  1712.  
  1713. Related Functions:
  1714.  
  1715.     Access, GetMandatory, GetMessage, GetNumeric, 
  1716.     GetOverride, GetProtect, GetValue, GetVisible,
  1717.     GetWarning, LockFields, ResetOverride, 
  1718.     SetMandatory, SetMessage, SetNumeric, 
  1719.     SetOverride, SetValue, SetVisible, SetWarning
  1720.  
  1721. ^Function SetValue (s1, "f1","f2","f3", ..., "99")
  1722.  
  1723. Sets the contents of the designated fields to
  1724. a specified value.
  1725.  
  1726. s1 is the value. 
  1727. f1 ... f99 are the affected fields.
  1728.  
  1729. Picture processing, where applicable, will be applied.
  1730. The fields are identified by field name, enclosed in
  1731. quotation marks. Any field name may have an
  1732. occurrence number appended to it. The following
  1733. formats are supported:
  1734.  
  1735.     JF01[2]      - Second occurrence of field JF01.
  1736.     JF02[-1]     - Previous occurrence of field JF02.
  1737.     JF03[+1]     - Next occurrence of field JF03.
  1738.     JF04[*]      - All occurrences of field JF04.
  1739.  
  1740. Example:
  1741.  
  1742. SetValue("Final Sale", "JF01[2]")
  1743.  
  1744. This sets the contents the second occurrence of
  1745. JF01 to the string Final Sale.
  1746.  
  1747. Related Functions:
  1748.  
  1749.     Access, GetMandatory, GetMessage, GetNumeric, 
  1750.     GetOverride, GetProtect, GetValue, GetVisible,
  1751.     GetWarning, LockFields, ResetOverride, 
  1752.     SetMandatory, SetMessage, SetNumeric, 
  1753.     SetOverride, SetProtect, SetVisible, SetWarning
  1754.  
  1755. ^Function SetVisible (n1, "f1","f2","f3", ..., "f99")
  1756.  
  1757. Sets the designated fields to be visible or invisible.
  1758.  
  1759. n1 is the setting (zero = invisible, non-zero = visible).
  1760.  
  1761. f1 ... f99 are the affected fields.
  1762.  
  1763. The fields are identified by field name, enclosed in
  1764. quotation marks.  Any field name may have an
  1765. occurrence number appended to it. The following
  1766. formats are supported:
  1767.  
  1768.     JF01[2]      - Second occurrence of field JF01.
  1769.     JF02[-1]     - Previous occurrence of field JF02.
  1770.     JF03[+1]     - Next occurrence of field JF03.
  1771.     JF04[*]      - All occurrences of field JF04.
  1772.  
  1773. Example:
  1774.  
  1775. SetVisible(0, "JF01")
  1776.  
  1777. This makes the field JF01 an invisible field.
  1778.  
  1779. Related Functions:
  1780.  
  1781.     Access, GetMandatory, GetMessage, GetNumeric, 
  1782.     GetOverride, GetProtect, GetValue, GetVisible,
  1783.     GetWarning, LockFields, ResetOverride, 
  1784.     SetMandatory, SetMessage, SetNumeric, 
  1785.     SetOverride, SetProtect, SetValue, SetWarning
  1786.  
  1787. ^Function SetWarning (n1, "f1","f2","f3", ..., "f99")
  1788.  
  1789. Sets the specified fields to display a warning if left
  1790. blank, as indicated by the value of the first parameter.
  1791.  
  1792. n1 is the setting (zero = off, non-zero = on)
  1793.  
  1794. A zero value in n1 indicates no message. A non-zero 
  1795. value indicates that a message is to be displayed.
  1796.  
  1797. f1 ... f99 are the affected fields.
  1798.  
  1799. The fields are identified by field name, enclosed in
  1800. quotation marks.  Any field name may have an
  1801. occurrence number appended to it. The following
  1802. formats are supported:
  1803.  
  1804.     JF01[2]      - Second occurrence of field JF01.
  1805.     JF02[-1]     - Previous occurrence of field JF02.
  1806.     JF03[+1]     - Next occurrence of field JF03.
  1807.     JF04[*]      - All occurrences of field JF04.
  1808.  
  1809. Example:
  1810.  
  1811. SetWarning(1, "JF01[2]")
  1812.  
  1813. This makes the second occurrence of JF01 display
  1814. a warning message if left blank during data entry.
  1815.  
  1816. Related Functions:
  1817.  
  1818.     Access, GetMandatory, GetMessage, GetNumeric, 
  1819.     GetOverride, GetProtect, GetValue, GetVisible,
  1820.     GetWarning, LockFields, ResetOverride, 
  1821.     SetMandatory, SetMessage, SetNumeric, 
  1822.     SetOverride, SetProtect, SetValue, SetVisible
  1823.  
  1824. ^category Financial
  1825. ^Function Apr (n1, n2, n3)
  1826.  
  1827. Computes the annual percentage rate for a loan.
  1828.  
  1829.  n1 is the principal amount of the loan.
  1830.  n2 is the payment on the loan.
  1831.  n3 is the number of periods.
  1832.  
  1833. Example:
  1834.  
  1835.  Apr(35000, 269.50, 360) returns .08515 (8.515%)
  1836.  This is the annual interest rate on a loan of
  1837.  $35,000 being repaid at $269.50 per month over
  1838.  30 years (360 months).
  1839.  
  1840. Related Functions:
  1841.  
  1842.     CTerm, FV, IPmt, NPV, Pmt, PPmt, PV, Rate, 
  1843.     Term
  1844.  
  1845. ^Function CTerm (n1, n2, n3)
  1846.  
  1847. Computes the number of periods needed for an
  1848. investment earning a fixed, but compounded,
  1849. interest rate to grow to a future value.
  1850.  
  1851.  n1 is the annual interest rate
  1852.  n2 is the future value of the investment
  1853.  n3 is the amount of the initial investment
  1854.  
  1855. Example:
  1856.  
  1857. CTerm(.02, 200, 100) returns 35. One hundred
  1858. dollars ($100) invested at 2% would require
  1859. 35 periods to grow to $200.
  1860.  
  1861. Related Functions:
  1862.  
  1863.     Apr, FV, IPmt, NPV, Pmt, PPmt, PV, Rate, Term
  1864.  
  1865. ^Function FV (n1, n2, n3)
  1866.  
  1867. Computes the future value of a series of equal
  1868. payments at a fixed interest rate.
  1869.  
  1870.  n1 is the amount of each equal payment.
  1871.  n2 is the interest rate for the period.
  1872.  n3 is the number of periods.
  1873.  
  1874. Example:
  1875.  
  1876. FV(100, .00625, 120) returns 17793.03. 
  1877.  
  1878. If $100 is paid each month for 120 periods
  1879. into an account bearing interest at 7.5%
  1880. (.075/12) per period, the account will contain
  1881. $17,793.03 at the end of the 10 periods.
  1882.  
  1883. Related Functions:
  1884.  
  1885.     Apr, CTerm, IPmt, NPV, Pmt, PPmt, PV, Rate, 
  1886.     Term
  1887.  
  1888. ^Function IPmt (n1, n2, n3, n4, n5)
  1889.  
  1890. Computes the amount of interest paid on a loan
  1891. over a period of time.
  1892.  
  1893.  n1 is the principal amount of the loan.
  1894.  n2 is the annual interest rate.
  1895.  n3 is the monthly payment.
  1896.  n4 is the first month of the computation.
  1897.  n5 is the number of months to be computed.
  1898.  
  1899. Example:
  1900.  
  1901. IPmt(30000, .085, 295.50, 7, 3) returns 624.88.
  1902.  
  1903. This is the amount of interest paid starting
  1904. with month 7 for 3 months on a loan of
  1905. $30,000.00 at an annual interest rate of 8.5%
  1906. being repaid at $295.50 per month.
  1907.  
  1908. Related Functions:
  1909.  
  1910.     Apr, CTerm, FV, NPV, Pmt, PPmt, PV, Rate, Term
  1911.  
  1912. ^Function NPV (n1, n2, n3, n4,..., n99)
  1913.  
  1914. Computes the net present value of an investment,
  1915. based on a a list of cash flow values and a discount
  1916. rate.
  1917.  
  1918. n1 is the discount rate over one period.
  1919.  
  1920. n2...n99 are the values which must be equally 
  1921. spaced in time and occur at the end of each period.
  1922.  
  1923. NPV uses the order of n2, n3,... to interpret the order
  1924. of the cash flows.
  1925.  
  1926. Example:
  1927.  
  1928. NPV(.15, 100000, 120000, 130000, 140000, 50000)
  1929. returns 368075.16. If an investment is projected
  1930. to generate $100,000, $120,000, $130,000,
  1931. $140,000 and $50,000 over each of the next five
  1932. years and the rate is 15% per annum, the NPV is
  1933. $368,075.16.
  1934.  
  1935. Related Functions:
  1936.  
  1937.     Apr, CTerm, FV, IPmt, Pmt, PPmt, PV, Rate, Term
  1938.  
  1939. ^Function Pmt (n1, n2, n3)
  1940.  
  1941. Computes a loan payment for a given principal,
  1942. interest, and term.
  1943.  
  1944.  n1 is the principal amount of the loan.
  1945.  n2 is the interest rate per period.
  1946.  n3 is the number of periods.
  1947.  
  1948. Example:
  1949.  
  1950. Pmt(30000.00, .007083, 144) returns 333.02.
  1951. This is the monthly payment for a loan of
  1952. $30,000 repayable over 12 years (144 months)
  1953. at a yearly interest rate of 8.5% (monthly rate
  1954. of .085/12 = .007083).
  1955.  
  1956. Related Functions:
  1957.  
  1958.     Apr, CTerm, FV, IPmt, NPV, PPmt, PV, Rate, Term
  1959.  
  1960. ^Function PPmt (n1, n2, n3, n4, n5)
  1961.  
  1962. Computes the amount of principal paid on a
  1963. loan over a period of time.
  1964.  
  1965.  n1 is the principal amount of the loan.
  1966.  n2 is the annual interest rate.
  1967.  n3 is the monthly payment.
  1968.  n4 is the first month of the computation.
  1969.  n5 is the number of months to be computed.
  1970.  
  1971. Example:
  1972. PPmt(30000, .085, 295.50, 7, 3) returns 261.62.
  1973. This is the amount of principal paid starting
  1974. with month 7 for 3 months on a loan of $30,000
  1975. at an annual interest rate of 8.5%, being repaid
  1976. at $295.50 per month. The annual interest rate
  1977. is used in the function because of the need to
  1978. calculate a range within the entire year.
  1979.  
  1980. Related Functions:
  1981.  
  1982.     Apr, CTerm, FV, IPmt, NPV, Pmt, PV, Rate, Term
  1983.  
  1984. ^Function PV (n1, n2, n3)
  1985.  
  1986. Computes the present value of an investment
  1987. given an equal payment per period, a specific
  1988. interest rate, and a number of periods.
  1989.  
  1990.  n1 is the amount of each equal payment.
  1991.  n2 is the interest rate per period.
  1992.  n3 is the number of periods.
  1993.  
  1994. Example:
  1995.  
  1996. PV(1000, .006666667, 60) returns 49318.43.
  1997. This is the present value of $1000.00 invested
  1998. at 8% percent (.08/12 per month) for 5 years
  1999. (60 months).
  2000.  
  2001. Related Functions:
  2002.  
  2003.     Apr, CTerm, FV, IPmt, NPV, Pmt, PPmt, Rate, 
  2004.     Term
  2005.  
  2006. ^Function Rate (n1, n2, n3)
  2007.  
  2008. Computes the compound interest rate per period
  2009. required for an investment to grow from present
  2010. value to future value in a specified period.
  2011.  
  2012.  n1 is the future value.
  2013.  n2 is the present value.
  2014.  n3 is the term (number of periods).
  2015.  
  2016. Example:
  2017.  
  2018. Rate(110, 100, 1) returns .10.
  2019.  
  2020. If $100 is invested for 1 term, the rate of interest
  2021. must be 10% for that investment to grow to $110.
  2022.  
  2023. Related Functions:
  2024.  
  2025.     Apr, CTerm, FV, IPmt, NPV, Pmt, PPmt, PV, Term
  2026.  
  2027. ^Function Term (n1, n2, n3)
  2028.  
  2029. Computes the number of periods needed to
  2030. reach a given future value by making equal
  2031. payments into an interest-bearing account
  2032. at the end of each period.
  2033.  
  2034.  n1 is the payment amount made at the end
  2035.  of each period.
  2036.  n2 is the annual interest rate.
  2037.  n3 is the future value.
  2038.  
  2039. Example:
  2040.  
  2041. Term(475, .05, 1500) returns 3.1438
  2042.  
  2043. If $475 is deposited at the end of each
  2044. period into an account bearing 5% compound
  2045. interest, it will take 3.1438 periods for it to
  2046. grow to $1500.00.
  2047.  
  2048. Related Functions:
  2049.  
  2050.     Apr, CTerm, FV, IPmt, NPV, Pmt, PPmt, PV, Rate
  2051.  
  2052. ^category Logic Control
  2053. ^Function Choose (n1, s1, s2,... s99)
  2054.  
  2055. Uses n1 to select a value from the list of
  2056. arguments s1...s99.
  2057.  
  2058. n1 is a number which indicates the placement of
  2059. a value in a list of arguments.  If n1 is equal to 1,
  2060. value s1 is returned.  If n1 is equal to 2, value s2 
  2061. is returned, and so on.  If n1 is less than 1 or is 
  2062. greater than the number of available arguments, 
  2063. zero is returned.
  2064.  
  2065. s1, s2,...s99 is the list from which the value is 
  2066. selected.  These can be numbers, alpha-numeric 
  2067. strings (enclosed in quotes), or fieldnames. These 
  2068. arguments are a list not a range.
  2069.  
  2070. Examples:
  2071.  
  2072.   Choose(3,"Design","Filler","Merge","Server")
  2073.   will return Merge.
  2074.  
  2075.   Choose(JF01,"A","B","C") returns B if the
  2076.   value in JF01 is 2.
  2077.  
  2078.    Sum(Choose(JF01,JF12,JF13,JF14)) will compute
  2079.    a different sum based on the value of JF01. If JF01
  2080.    is 1, the sum of all occurrences of JF12 is returned.
  2081.    If JF01 is 2, the sum of all occurrences of JF13 is 
  2082.    returned.  If JF01 is 3, the sum of all occurrences 
  2083.    of JF14 is returned.
  2084.  
  2085. Related Functions:
  2086.  
  2087.     If, Return
  2088.  
  2089. ^Function If (e1, s1, s2) 
  2090.               
  2091. Returns a value based on whether the specified
  2092. expression is evaluated as true or false.
  2093.  
  2094.  e1 is the expression to evaluate.
  2095.  
  2096.  s1 is the action taken if the expression e1 is
  2097.  evaluated as true. 
  2098.  
  2099.  s2 is the action taken if the expression e1 is
  2100.  evaluated as false. 
  2101.  
  2102.  If the expression is true, a non-zero value is 
  2103.  returned.If the expression is false, a zero value is 
  2104.  returned.
  2105.  
  2106. The If function can be used to vary the calculation 
  2107. depending on the value of other fields on the form.
  2108.  
  2109. Examples:
  2110.  
  2111.  If(FIELDA>100,10,5)
  2112.  
  2113. Calculate DISCOUNT as 10% if FIELDA is greater 
  2114. than 100, else set DISCOUNT to 5%.
  2115.  
  2116. If(TOTAL>1000,"DIVISION MGR.","DEPT.MGR")
  2117.  
  2118. If the value of the field TOTAL is greater than 1000, 
  2119. the string inserted into APPROVAL will be DIVISION 
  2120. MGR. If the value of the field TOTAL is less than 
  2121. 1000, APPROVAL is set to DEPT MGR.
  2122.  
  2123. If(RESPONSE="Yes"| RESPONSE="Y", "GO TO
  2124. SECTION A","GO TO SECTION B")
  2125.  
  2126. If the RESPONSE field contains YES or Y then insert 
  2127. "GO TO SECTION A" into the current field, otherwise
  2128. insert "GO TO SECTION B" into the current field. 
  2129. Note that in this example, the "|" character is an "or" 
  2130. statement. Other logical operators can be used to
  2131. produce different results, for example "&" to represent 
  2132. "and" 
  2133.  
  2134. If(TOTAL ~> 1000,"Small Purchase Only","Requires 
  2135. Approval")
  2136.  
  2137. If the value in the TOTAL field is not greater than 
  2138. 1000 then insert Small Purchase Only into the field, 
  2139. Otherwise, insert Requires Approval into the field.
  2140.  
  2141. Related Functions:
  2142.  
  2143.     Choose, Oneof, Return, Within
  2144.  
  2145. ^Function Return (v1)
  2146.  
  2147. Returns the specified value (v1). The function is 
  2148. more useful as part of a constructed If.
  2149.  
  2150. Related Functions:
  2151.  
  2152.     Choose, If
  2153.  
  2154.  
  2155. ^category String Manipulation
  2156. ^Function At (s1, s2)
  2157.  
  2158. Locates the starting character position of
  2159. string s2 within string s1.
  2160.  
  2161. s1 is the source string.
  2162.  
  2163. s2 is the string to search for.
  2164.  
  2165. If string s2 is not in the source string, the function
  2166. returns 0.  If string s2 is located, the character 
  2167. position of the start of s2 within s1 is returned.
  2168.  
  2169. Examples:
  2170.  
  2171. At("ABCDE","DE") returns 4.
  2172.  
  2173. At(FIELD01,"YZ") where FIELD01 contains the string
  2174. "WXYZ" returns 3.
  2175.  
  2176. At(STR(FIELDA), "999") returns 4, where FIELDA
  2177. is a numeric field containing 123999456. The STR
  2178. function converts the numeric value to a string.
  2179.  
  2180. Related Functions:
  2181.  
  2182.     Concat, Left, Len, Lower, Ltrim, Oneof, Replace,
  2183.     Right, Rtrim, Space, Str, Stuff, Substr, Upper, Val,
  2184.     Within, WordNum
  2185.  
  2186. ^Function Concat (s1, s2, [s3],[s4],..., [s99])
  2187.  
  2188. Returns the string concatenation for all specified 
  2189. strings.  At least two strings must be specified.
  2190.  
  2191.  s1 - the first string
  2192.  s2 - the second string to append to the first.
  2193.  
  2194. Examples:
  2195.  
  2196. Concat ("ABC","CDE") returns "ABCCDE"
  2197.  
  2198. Concat ("XX",FIELDA,"-01") returns "XXABC-01", if
  2199. the value of FIELDA is "ABC".
  2200.  
  2201. Related Functions:
  2202.  
  2203.     At, Left, Len, Lower, Ltrim, Oneof, Replace,
  2204.     Right, Rtrim, Space, Str, Stuff, Substr, Upper, Val,
  2205.     Within, WordNum
  2206.  
  2207. ^Function Left (s1, n1)
  2208.  
  2209. Returns a specified number of characters from a
  2210. string, starting from the first characters on the left.
  2211.  
  2212. s1 is the string.
  2213.  
  2214. n2 is the number of characters to extract.
  2215.  
  2216. This string manipulation function is used to
  2217. extract parts of another string.
  2218.  
  2219. Examples:
  2220.  
  2221.  Left("ABCD",2) returns "AB"
  2222.  Left(XYZ-3031",3) returns "XYZ"
  2223.  Left(ZIP,5) returns the first five characters of
  2224.  the value of the field ZIP.
  2225.  
  2226. Related Functions:
  2227.  
  2228.     Access, At, Concat, Len, Lower, Ltrim, Oneof, 
  2229.     Replace, Right, Rtrim, Space, Str, Stuff, Substr, 
  2230.     Upper, Val,  Within, WordNum
  2231.  
  2232. ^Function Len (s1)
  2233.  
  2234. Returns the length (number of characters) in a
  2235. specified string.
  2236.  
  2237. s1 is the string to be evaluated.
  2238.  
  2239. Examples:
  2240.  
  2241.  Len("ABC") returns 3
  2242.  Len("ABCDEFG") returns 7
  2243.  Len(ZIP) returns 10 if the current value of the ZIP
  2244.  field is 12345-6789.
  2245.  
  2246. Related Functions:
  2247.  
  2248.     Access, At, Concat, Left, Lower, Ltrim, Oneof, 
  2249.     Replace, Right, Rtrim, Space, Str, Stuff, 
  2250.     Substr, Upper, Val, Within, WordNum
  2251.  
  2252. ^Function Lower (s1)
  2253.  
  2254. Returns a string where all uppercase characters
  2255. are converted to lowercase.
  2256.  
  2257. s1 is the string to be converted.
  2258.  
  2259. Examples:
  2260.  
  2261.  Lower("ABC") returns "abc"
  2262.  Lower("Abc123X") returns "abc123x"
  2263.  
  2264. Related Functions:
  2265.  
  2266.     Abs, At, Ceiling, Concat, Count, Floor, Left, Len,
  2267.     Ltrim, Max, Min, Mod, Oneof, Pi, Replace, Right
  2268.     Round, Rtrim, Space, Sqrt, Str, Stuff, Substr,
  2269.     Upper, Val Within, WordNum
  2270.  
  2271. ^Function Ltrim (s1)
  2272.  
  2273. Returns a string with all leading blanks removed.
  2274.  
  2275. s1 is the string to be evaluated.
  2276.  
  2277. Examples:
  2278.  
  2279.  Ltrim(" ABC") returns "ABC"
  2280.  Ltrim("     XY  ABC") returns "XY ABC"
  2281.  
  2282. Related Functions:
  2283.  
  2284.     Access, At, Concat, Left, Len, Lower, Oneof, 
  2285.     Replace, Right, Rtrim, Space, Str, Stuff, Substr, 
  2286.     Upper, Val, Within, WordNum
  2287.  
  2288. ^Function Oneof (s1, s2, [s3],[s4],..., [s99])
  2289.  
  2290. Is a logical function which returns true (1) or
  2291. false (0).  True (1) is returned if the first
  2292. parameter is one of the values defined by the
  2293. second and subsequent parameters.
  2294.  
  2295. s1 is the value to match in the set defined by
  2296. the other parameters.
  2297.  
  2298. s2 is the first value in the set. At least one
  2299. value must be specified.
  2300.  
  2301. s3 to s99 are optional values in the set to be
  2302. matched.
  2303.  
  2304. Unlike most other functions, Oneof( ) operates 
  2305. differently on strings than it does on numerics. If s1 is 
  2306. numeric, all parameters s2...99 are converted to 
  2307. numeric values,  and a numeric test is performed. If 
  2308. s1 is a string, all other parameters are converted to 
  2309. strings, and string comparisons are done. A field 
  2310. value is considered numeric if the Numeric attribute is 
  2311. set. Otherwise, the field value is considered a string.
  2312.  
  2313. Examples:
  2314.  
  2315. Oneof is a good function to use as a validation for 
  2316. user input. For example, you may have a field into 
  2317. which the user may enter F for female and M for 
  2318. male. Any other input is invalid. The most appropriate
  2319. validation function would be Oneof, which returns
  2320. true or false, 
  2321.  
  2322. The correct syntax of the field validation would be:
  2323.  
  2324.      Oneof($,"M","F")
  2325.  
  2326. The $ tells JetForm Filler to match the entered
  2327. value against the acceptable values of M or F.
  2328. If the user enters any letter other than M or F,
  2329. and error message appears.
  2330.  
  2331. Oneof($,4,13,24) returns true (1) if the current
  2332. field has a value of 4,13 or 24; otherwise it
  2333. returns a false (0) result.
  2334.  
  2335. Oneof(CLASS,"A","B","D") returns 1 if the value in
  2336. the field CLASS is "A", "B" or "D"; otherwise it
  2337. returns a 0 result.
  2338.  
  2339. Related Functions:
  2340.  
  2341.     At, Concat, If, Left, Len, Lower, Ltrim, Replace,
  2342.     Right, Rtrim, Space, Str, Stuff, Substr, Upper, Val,
  2343.     Within, WordNum
  2344.  
  2345. ^Function Replace (s1, s2, s3)
  2346.  
  2347. Changes all occurrences of a specified string
  2348. to a new string.
  2349.  
  2350.  s1 is the existing text string.
  2351.  s2 is the text to be replaced.
  2352.  s3 is the new text for replacement.
  2353.  
  2354. Examples:
  2355.  
  2356. Replace("this is the dog", "dog", "cat")
  2357.  
  2358. This changes the original string to
  2359. "this is the cat".
  2360.  
  2361. Replace(JF01, "dog", "cow")
  2362.  
  2363. If the contents of the field JF01 were 
  2364. "this is the dog", then this function would 
  2365. change the contents of the field to 
  2366. "this is the cow".
  2367.  
  2368. Related Functions:
  2369.  
  2370.     At, Concat, Left, Len, Lower, Ltrim, Oneof, 
  2371.     Right, Rtrim, Space, Str, Stuff, Substr, Upper, Val,
  2372.     Within, WordNum
  2373.  
  2374. ^Function Right (s1, n1)
  2375.  
  2376. Returns a specified number of characters from a
  2377. string, beginning with the last character on the
  2378. right.
  2379.  
  2380. s1 is the string to be evaluated. If a field name  is 
  2381. used as this parameter, do not enclose it in quotation 
  2382. marks.
  2383.  
  2384. n2 is the number of characters to extract.
  2385.  
  2386. Examples:
  2387.  
  2388.  Right("ABC",2) returns "BC"
  2389.  Right("XYZ-3031",4) returns "3031"
  2390.  Right(ZIP,4) returns the last four characters of
  2391.  the field ZIP.
  2392.  
  2393. Related Functions:
  2394.  
  2395.     Access, At, Concat, Left, Len, Lower, Ltrim, Oneof, 
  2396.     Replace, Rtrim, Space, Str, Stuff, Substr, Upper, 
  2397.     Val, Within, WordNum
  2398.  
  2399. ^Function Rtrim (s1)
  2400.  
  2401. Returns a string with all trailing blanks removed.
  2402.  
  2403. s1 is the string to be evaluated. If a field name is
  2404. used as this parameter, do not enclose it in
  2405. quotation marks.
  2406.  
  2407. Examples:
  2408.  
  2409.  Rtrim("ABC  ") returns "ABC"
  2410.  Rtrim("XYZ ABC ") returns "XYZ ABC"
  2411.  
  2412. Related Functions:
  2413.  
  2414.     Access, At, Concat, Left, Len, Lower, Ltrim, Oneof, 
  2415.     Replace, Right, Space, Str, Stuff, Substr, Upper, 
  2416.     Val, Within, WordNum
  2417.  
  2418. ^Function Space (n1)
  2419.  
  2420. Generates a string with a specified number of
  2421. blanks.
  2422.  
  2423. n1 is the number to be generated.
  2424.  
  2425. Example:
  2426.  
  2427. Space(2) returns "  ".
  2428.  
  2429. Related Functions:
  2430.  
  2431.     Access, At, Concat, Left, Len, Lower, Ltrim, 
  2432.     Right, Rtrim, Str, Stuff, Substr,  Val, 
  2433.     
  2434.  
  2435. ^Function Str (n1, [n2], [n3])
  2436.  
  2437. Converts a number to a character string.
  2438.  
  2439. n1 is the number to be converted. This can also be
  2440. the name of a numeric field. Do not enclose the
  2441. field name in quotation marks.
  2442.  
  2443. n2 is the length of the string. If not
  2444. specified, the default value of 10 is used.
  2445.  
  2446. n3 is the number of digits to appear after the
  2447. decimal point. If not specified, 0 is used as
  2448. the default.
  2449.  
  2450. If the resulting string is too long, then
  2451. asterisks are returned.
  2452.  
  2453. Examples:
  2454.  
  2455.  Str(4.532,6,4) returns "4.5320"
  2456.  Str(2.456) returns "     2"
  2457.  Str(31.2345,4,2) returns "****"
  2458.  
  2459. Related Functions:
  2460.  
  2461.     At, Concat, Left, Len, Lower, Ltrim, Oneof,  
  2462.     Replace, Right, Rtrim, Space, Stuff, Substr, Upper, 
  2463.     Val, Within, WordNum
  2464.  
  2465. ^Function Stuff ("s1", "n1"," n2"," s2")
  2466.  
  2467. Inserts a string into another string.
  2468.  
  2469. s1 is the string to insert into.
  2470.  
  2471. n1 is the character position in string s1, where
  2472. 1 is for the first character.
  2473.  
  2474. n2 is the number of characters to delete from
  2475. string s1, starting at character n1.
  2476.  
  2477. s2 is the string to insert into s1 starting at
  2478. position n1.
  2479.  
  2480. You can use field names of non-numeric fields
  2481. for parameters s1 and s2. Do not enclose the
  2482. field names in quotation marks.
  2483.  
  2484. Examples:
  2485.  
  2486.  Stuff("ABCDE",3,2,"XYZ") returns "ABXYZE"
  2487.  Stuff("abcde",4,1,"wxyz") returns "abcwxyze"
  2488.  Stuff("ABCDE",2,0,"XYZ") returns "AXYZBCDE"
  2489.  
  2490. Related Functions:
  2491.  
  2492.     Access, At, Concat, Left, Len, Lower, Ltrim, Oneof, 
  2493.     Replace, Right, Rtrim, Space, Str, Substr, Upper, 
  2494.     Val, Within, WordNum
  2495.  
  2496. ^Function Substr (s1, n1, n2)
  2497.  
  2498. Extracts a portion of a specified string.
  2499.  
  2500. s1 is the string to be evaluated. This can also be the
  2501. name of a non-numeric field. If you use a field name, 
  2502. do not enclose it in quotation marks.
  2503.  
  2504. n1 is the character position in string s1.
  2505.  
  2506. n2 is the number of characters to extract.
  2507.  
  2508. Examples:
  2509.  
  2510.  Substr("ABCDEFG",3,4) returns "CDEF"
  2511.  Substr("abcdefghi",5,3) returns "efg"
  2512.  
  2513. Related Functions:
  2514.  
  2515.     Access, At, Concat, Left, Len, Lower, Ltrim, Oneof, 
  2516.     Replace, Right, Rtrim, Space, Str, Stuff, Upper, 
  2517.     Val,  Within, WordNum
  2518.  
  2519. ^Function Upper (s1)
  2520.  
  2521. Returns a string with all lowercase characters
  2522. converted to uppercase.
  2523.  
  2524. s1 is the string to be converted.
  2525.  
  2526. Examples:
  2527.  
  2528.  Upper("abc") returns "ABC"
  2529.  Upper(AbcdE") returns "ABCDE"
  2530.  
  2531. Related Functions:
  2532.  
  2533.    Abs, At, Concat, Count, Floor, Left, Len, Lower, 
  2534.     Ltrim,    Max, Min, Mod, Pi, Oneof, Replace, Right, 
  2535.     Round, Rtrim, Space, Sqrt, Str, Stuff, Substr, Val, 
  2536.     Within, WordNum
  2537.  
  2538. ^Function Val (s1)
  2539.  
  2540. Converts a string to a number.
  2541.  
  2542. s1 is the string to be converted. This can also be the 
  2543. name of a non-numeric field. If you are using a field 
  2544. name, do not enclose it in quotation marks.
  2545.  
  2546. Whenever a string is converted to a numeric value, 
  2547. various Picture editing characters are ignored. 
  2548. Leading $ and embedded commas are dropped. If 
  2549. the number is in parentheses, or contains a trailing 
  2550. "CR", a negative number is assumed.
  2551.  
  2552. Normally Val( ) is automatically called to convert 
  2553. numeric values whenever needed.  Val( ) need only 
  2554. be used for functions such as Oneof( ) and Within( ) 
  2555. which are type sensitive.
  2556.  
  2557. Examples:
  2558.  
  2559. Val("123") returns 123
  2560.  
  2561. If the string is not a valid number then a value
  2562. of zero is returned.
  2563.  
  2564. Related Functions:
  2565.  
  2566.    Access, At, Concat, Left, Len, Lower, Ltrim, Oneof, 
  2567.    Replace, Right, Rtrim, Space, Str, Stuff, Substr, 
  2568.    Upper, Within, WordNum
  2569.  
  2570. ^Function Within (s1, s2, s3)
  2571.  
  2572. A logical function which returns true (1) or false (0). 
  2573. True (1) is returned if the first parameter is within the 
  2574. range defined by the next two parameters. Otherwise 
  2575. it returns false (0).
  2576.  
  2577. s1 is the value to test.
  2578.  
  2579. s2 is the start of the range.
  2580.  
  2581. s3 is the end of the range.
  2582.  
  2583. This function can be used as a validation rule to test 
  2584. whether the entered value is within the specified 
  2585. range.
  2586.  
  2587. Unlike most other functions, Within( ) operates 
  2588. differently on strings than it does on numerics. If s1 is 
  2589. numeric, parameters s2 and s3 are converted to 
  2590. numeric values and a numeric test is performed. If s1 
  2591. is a string, all other parameters are converted to 
  2592. strings and string comparisons are done.  A field 
  2593. value is considered numeric if the Numeric attribute 
  2594. has been set. Otherwise, the field value is considered 
  2595. a string.
  2596.  
  2597. Examples:
  2598.  
  2599.  Within("C","A","D") returns true (1)
  2600.  Within(1.5,0,2) returns true (1)
  2601.  Within(-1,0,2) returns false (0)
  2602.  
  2603. Use Within in a validation to verify user input. For 
  2604. example, on a Employee Review form you want to
  2605. ensure that the user enters an evaluation number 
  2606. between 1 and 10. The validation that you would use 
  2607. for this is Within ($,1,10)
  2608.  
  2609. 1 is the lower limit and 10 is the upper limit. The $ 
  2610. sign tells JetForm Filler to look in the current field for 
  2611. the value to check.
  2612.  
  2613. Related Functions:
  2614.  
  2615.     At, Concat, Left, Len, Lower, Ltrim, Oneof, 
  2616.     Replace, Right, Rtrim, Space, Str, Stuff, Substr, 
  2617.     Upper, Val,  WordNum
  2618.  
  2619. ^Function WordNum (n1, n2)
  2620.  
  2621. Converts a given number to an English text 
  2622. equivalent. The default uses option number 0.
  2623.  
  2624.  n1 is the number to be converted.
  2625.  n2 identifies the output format.
  2626.       0 = formats as "One Hundred and Twenty-three"
  2627.       1 = formats as "One Hundred and Twenty-three 
  2628.             Dollars"
  2629.       2 = formats as "One Hundred...Dollars and Forty  
  2630.             Cents"
  2631.  
  2632. Example:
  2633.  
  2634.  WordNum(73.54,2) will return:
  2635.  Seventy-three Dollars and Fifty-four Cents
  2636.  
  2637. Related Functions:
  2638.  
  2639.     At, Concat, Left, Len, Lower, Ltrim, Oneof, 
  2640.     Replace, Right, Rtrim, Space, Str, Stuff, Substr, 
  2641.     Upper, Val, Within
  2642.  
  2643.  
  2644. ^category Windows Extensions
  2645. ^Function CallDll (ReturnType, DLL, Func, Type1,
  2646.     Value1, Type2, Value2)
  2647.  
  2648. Calls a user created DLL that incorporates a 
  2649. customized calculation or validation function.
  2650.  
  2651. ReturnType is the datatype of the returned data 
  2652. (includes the datatypes listed below, as well as 
  2653. datatype 0 for a void function).
  2654.  
  2655. DLL is the name of the DLL to access.
  2656.  
  2657. Func is the name of the function to be called within
  2658. the DLL.
  2659.  
  2660. Type1 is the datatype of the first parameter to the 
  2661. function.
  2662.  
  2663. Value1 is the actual first parameter to the function.
  2664.  
  2665. Type2 is the datatype of the second parameter to the
  2666. function.
  2667.  
  2668. Value2 is the actual second parameter to the 
  2669. function.
  2670.  
  2671. A string up to 45 Type and Value statement pairs can
  2672. be placed in the function.
  2673.  
  2674. Datatypes include the following:
  2675.  
  2676.     0 = void function
  2677.     1 = Single character
  2678.     2 = 16 bit Integer
  2679.     3 = 32 bit Long
  2680.     4 = Float - short floating point number
  2681.     5 = Double - long floating point number
  2682.    11 = Address of a character string
  2683.    12 = Address of an Integer
  2684.    13 = Address of a Long
  2685.    14 = Address of a Float
  2686.    15 = Address of a Double
  2687.  
  2688.  
  2689. Example:
  2690.  
  2691. In the following function:
  2692.  
  2693. CallDll(5, "FINCALC.DLL", "CalcInterestAmount", 5,
  2694.             MORT_AMT, 5, INT_RATE, 2, MONTHS)
  2695.  
  2696. where, MORT_AMT is a field containing the original
  2697. amount of the mortgage, INT_RATE is a field 
  2698. containing annual interest rate of the mortgage, and 
  2699. MONTHS is a field containing the number of months 
  2700. of the amortization. The result is a floating point 
  2701. number equal to the amount of interest to be paid.
  2702.  
  2703. In the following function:
  2704.  
  2705. CallDll(0,"ADDRESS.DLL","AddDouble",15,field01,-
  2706.             15, field02)
  2707.  
  2708. AddDouble is a void function (datatype 0) which takes 
  2709. the addresses of two floating point numbers, adds the 
  2710. numbers, and puts the result into the second 
  2711. parameter (field02). The negative sign (-) on field02 
  2712. indicates that this field value is to be the result of a 
  2713. calculation.
  2714.  
  2715.  
  2716. ^Function DDE ([s1], [s2], [s3])
  2717.  
  2718. This function requests data from a specified 
  2719. application whenever a recalculation is done. A 
  2720. standard Dynamic Data Exchange (DDE) protocol is 
  2721. used, namely the DDE_REQUEST command.
  2722.  
  2723. s1 identifies the application from which data is
  2724. desired. ie. "EXCEL".
  2725.  
  2726. s2 identifies the topic or file associated with
  2727. the above application. ie. "SHEET1.XLS".
  2728.  
  2729. s3 identifies the field, cell name, or range
  2730. from which the data is taken, that is, "R2C3".
  2731.  
  2732. All three parameters are required.
  2733.  
  2734. DDE("Excel","Sheet1.xls","R2C3") retrieves the
  2735. data in the cell "R2C3" of the Excel spreadsheet
  2736. "Sheet1.xls". The data is requested only once.
  2737.  
  2738. If the value changes in Excel then a recalculation 
  2739. must be done in order to update the value in Filler .
  2740.  
  2741. NOTE:    The "PasteLink" button is a fast way to 
  2742.      define the function. In the target application, 
  2743.      copy the contents of the desired field to the 
  2744.      clipboard. In Filler, press the "PasteLink" 
  2745.      button. The required format is generated, 
  2746.      with the exception that the function is 
  2747.      DDEAUTO(). Just rename it to DDE().
  2748.  
  2749. Refer to JetForm Functions in the Online Help for
  2750. more information.
  2751.  
  2752. Related Functions:
  2753.  
  2754.     DDEAUTO
  2755.  
  2756. ^Function DDEAUTO ([s1], [s2], [s3])
  2757.  
  2758. This function creates a 'hot link' between the
  2759. specified application and Filler. Whenever the value 
  2760. of the listed field/cell changes, the new value is 
  2761. automatically sent to Filler to update the field.
  2762.  
  2763. These links will automatically be renewed every
  2764. time Filler and the other application are run.
  2765. A standard Dynamic Data Exchange (DDE) protocol
  2766. is used, namely the DDE_ADVISE command.
  2767.  
  2768. s1 identifies the application from which data is
  2769. desired. ie. "EXCEL".
  2770.  
  2771. s2 identifies the topic or file associated with
  2772. the above application. ie. "SHEET1.XLS".
  2773.  
  2774. s3 identifies the field, cell name, or range
  2775. from which the 'hot link' is made, that is, "R2C3".
  2776.  
  2777. All three parameters are required.
  2778.  
  2779. DDEAUTO("Excel","Sheet1.xls","R2C3") retrieves
  2780. the data from the cell "R2C3" of the Excel
  2781. spreadsheet "Sheet1.xls" whenever it is modified.
  2782.  
  2783. IF the value changes in Excel then the new value
  2784. is passed to Filler to keep them equivalent.
  2785.  
  2786. NOTE:    The "PasteLink" button is a fast way to 
  2787.      define the function. In the target application, 
  2788.      copy the contents of the desired field to the 
  2789.      clipboard. In Filler, press the "PasteLink" 
  2790.      button. The required format is generated, 
  2791.      with the exception that the function is 
  2792.      DDEAUTO(). Just rename it to DDE().
  2793.  
  2794. Refer to JetForm Functions in the Online Help
  2795. for more information.
  2796.  
  2797. Related Functions:
  2798.  
  2799.     DDE
  2800.  
  2801. ^Function MessageBox (n1,s1,s2)
  2802.  
  2803. Used to create a Windows message box on the 
  2804. screen.
  2805. The form designer can use MessageBox to provide
  2806. multiple messages. Message contents are 
  2807. determined
  2808. by the logic in the validation rule.
  2809.  
  2810. n1 identifies the message box command
  2811. buttons:
  2812.     0 = OK
  2813.     1 = OK and Cancel
  2814.     2 = Abort, Retry, and Cancel
  2815.     3 = Yes, No, and Cancel
  2816.     4 = Yes and No
  2817.     5 = Retry and Cancel
  2818.  
  2819. s1 identifies the message appearing in the 
  2820. message box, enclosed in quotation marks.
  2821.  
  2822. s2 is the title for the messagebox, and is enclosed
  2823. in quotation marks.
  2824.  
  2825. The function returns a number based on the 
  2826. command button selected in the message box:
  2827.     1 = OK
  2828.     2 = Cancel
  2829.     3 = Abort
  2830.     4 = Retry
  2831.     5 = Ignore
  2832.     6 = Yes
  2833.     7 = No
  2834.  
  2835. Example:
  2836.  
  2837.  If(FIELDA>100,10,5)
  2838.  Calculate DISCOUNT as 10% if FIELDA>100,
  2839.  else set DISCOUNT to 5%.
  2840.  
  2841.  If(TOTAL>1000,"DIVISION MGR.","DEPT.MGR")
  2842.  Set the REQUIRED_APPROVAL depending on the
  2843.  value of the field TOTAL.
  2844.  
  2845. If(MessageBox(4,Concat("The total exceeds    
  2846.      $500.00. Obtain your Manager's 
  2847.      signature"))=6)THEN SetVisible(1,"MAN_SIG"); 
  2848.      make the Signature visible 
  2849.      SetVisible(1,"SIG_DATE"); make the Date visible
  2850.  
  2851.   ELSE
  2852.        
  2853.    Sum(EMP_TRAVEL,EMP_LIVING,EMP_PARKING)
  2854.  
  2855. ENDIF
  2856.  
  2857. This example shows the use of Message Box with 
  2858. Yes and No command buttons to display a message. 
  2859. If the test returns Yes (=6), the MAN_SIG and 
  2860. SIG_DATE fields becomes visible. If the test returns 
  2861. No, the expenses are totaled. 
  2862.  
  2863.  
  2864.