home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-03-09 | 74.7 KB | 2,864 lines |
- ^category Arithmetic
- ^Function Abs (n1)
-
- Returns the absolute value of a number.
-
- n1 is the number to evaluate.
-
- Examples:
-
- Abs(FIELDA) returns positive value of the current
- value of FIELDA. Activitate the numeric attribute
- when using this function.
-
- Abs(1.03) returns 1.03
- Abs(-1.03) returns 1.03
- Abs(0) returns 0
-
- Related Functions:
-
- Avg, Ceiling, Count, Exp, Floor, Max, Min, Mod, Pi,
- Round, SerialNum, Sqrt, Sum
-
- ^Function Avg (n1,[n2, ..., n100])
-
- This function computes the average of up to 100
- values. The values may be individual parameters,
- or may be a repeating field name.
-
- Note that any empty fields evaluate as if they
- contain the value 0 (zero).
-
- Example:
-
- If you had a calculation like this:
-
- Avg(field1,field2,field3,field4)
-
- where field1 has a value of 8, and field2,
- field3, and field4 are empty, returns a
- value of 2.
-
- Related Functions:
-
- Abs, Ceiling, Count, Exp, Floor, Max, Min, Mod, Pi,
- Round, SerialNum, Sqrt, Sum
-
- ^Function Ceiling (n1)
-
- Returns the whole number greater than or equal
- to n1.
-
- n1 is the number to evaluate.
-
- Examples:
-
- Ceiling(1.9) returns 2
- Ceiling(2) returns 2
- Ceiling(2.1) returns 3
- Ceiling(-1.9) returns -1
- Ceiling(A) returns 100 if A=99.999
-
- Related Functions:
-
- Abs, Avg, Count, Exp, Floor, Lower, Max, Min,
- Mod, Pi, Round, Sqrt, Str, Upper
-
- ^Function Count (f1)
-
- Counts the number of non-zero (for numeric) fields or
- non-null (for alphanumeric) fields on a page.
-
- f1 is the value to test, typically a field name.
-
- All occurrences of the field are processed. Count
- is most useful in situations where multiple line
- items are possible, but not all are filled in.
-
- For example, to compute the average price for a
- luncheon, use the count function to tell you how
- many of the attendee name fields contained non-null
- values. Divide the value in the total cost field by this
- result to obtain the average price.
-
- Example:
-
- Count(FIELDA )
- Return the number of occurrences FIELDA that are
- non-zero or non-null.
-
- Sum(FIELDB)/Count(FIELDB)
- Compute an average of the values entered in
- FIELDB.
-
- Related Functions:
-
- Abs, Avg, Ceiling, Exp, Floor, Lower, Max, Min,
- Mod, Pi, Round, SerialNum, Sqrt, Str, Sum,
- Upper
-
- ^Function Exp (n1, n2)
-
- This function computes the value of n1 raised to
- the power n2. If both n1 and n2 are 0 (zero),
- this function returns zero. If n1 is a negative
- number, the calculation uses the floor value of
- n2 as the exponent.
-
- For example, the function:
-
- Exp(3,2) returns 9
-
- Related Functions:
-
- Abs, Avg, Ceiling, Count, Floor, Max, Min, Mod, Pi,
- Round, SerialNum, Sqrt, Sum
-
- ^Function Floor (n1)
-
- Returns the largest whole number that is less
- than or equal to the specified value.
-
- n1 is the value to evaluate.
-
- Examples:
-
- Floor(6.5) returns 6
- Floor(7.0) returns 7
- Floor(FIELDA) returns 99 if FIELDA is 99.999
-
- Related Functions:
-
- Abs, Avg, Ceiling, Count, Exp, Max, Min, Mod, Pi,
- Round, SerialNum, Sqrt, Str, Sum, Upper
-
- ^Function Max (n1,[n2],..., [n99])
-
- Returns the maximum value of a specified set of
- numbers.
-
- n1 is the first value in the set.
-
- n2 to n99 are optional values in the set.
-
- The number of parameters can be as long as you
- like. One parameter must be provided.
-
- If only one parameter is given it is assumed to
- be a field with multiple occurrences on the
- form. In this case the maximum value of all
- occurrences is returned.
-
- Examples:
-
- Max(ITEMTOTAL) returns the maximum value found
- in all occurrences of the field ITEMTOTAL. Note
- that you do not enclose the field name in quotation
- marks.
-
- Max(7,10,-4,6) returns 10
-
- Related Functions:
-
- Abs, Avg, Ceiling, Count, Exp, Floor, Lower, Min,
- Mod, Pi, Round, SerialNum, Sqrt, STR, Sum,
- Upper
-
- ^Function Min (n1,[n2],[n3],..., [n99])
-
- Returns the minimum value of a specified set of
- numbers.
-
- n1 is the first value in the set.
-
- n2 to n99 are optional values in the set.
-
- The number of parameters can be as long as you
- like. At least one parameter must be provided.
-
- If only one parameter is given, it is assumed to
- be a field name, and the minimum value of all
- occurrences for that field is returned.
-
- Examples:
-
- Min(ITEMTOTAL) returns the minimum value found
- in all occurrences of the field ITEMTOTAL. Do not
- enclose the field name in quotation marks.
-
- Min(7,10,-4,6) returns -4
-
- Related Functions:
-
- Abs, Ceiling, Count, Floor, Lower, Max, Mod,
- Pi, Round, SerialNum, Sqrt, Str, Upper.
-
- ^Function Mod (n1, n2)
-
- Returns the remainder from a division of two
- numeric values.
-
- n1 is the dividend.
-
- n2 is the divisor.
-
- Examples:
-
- Mod(64,2)
- Returns 0, because the division does not result in a
- remainder.
-
- Mod(12,5)
- Returns 2, because 12/2 gives a result of 5 with
- a remainder of 2.
-
- Mod(FIELDA,FIELDB)
- Calculate the value of FIELDA divided by the value
- of FIELDB, and return any remainder.
-
- Related Functions:
-
- Abs, Avg, Ceiling, Count, Exp, Floor, Lower, Max,
- Min, Mod, Pi, Round, SerialNum, Sqrt, STR, Sum,
- Upper
-
- ^Function Pi ()
-
- Returns the value of pi (3.1415926...) which can
- be used as a constant in any calculation rule.
- No parameters are required.
-
- Example:
-
- Pi( )*(RADIUS*RADIUS) for the field CIRCLEAREA.
-
- Related Functions:
-
- Abs, Avg, Ceiling, Count, Exp, Floor, Max, Min,
- Mod, Round, SerialNum, Sqrt, Sum
-
- ^Function Round (n1, [n2])
-
- Returns a number rounded to a specified number
- of decimal places.
-
- n1 is the number to be evaluated. If a field name is
- used as this parameter, do not enclose it in
- quotation marks.
-
- n2 is the number of decimal places. If not
- specified, 0 is used as the default.
-
- Examples:
-
- Round(33.2345,3) returns 33.235
- Round(20/3,2) returns 6.67
- Round(-1.3,0) returns -1
- Round(TOTAL,2) returns 2.33 if the value of the
- field TOTALis 2.3333.
-
- Related Functions:
-
- Abs, Avg, Ceiling, Count, Exp, Floor, Lower,Max,
- Min, Mod, Pi, SerialNum, Sqrt, Sum, Upper
-
- ^Function SerialNum (filename)
-
- Returns the next serial number available from the
- designated file. If the current field is not blank,
- its contents are returned. The file must contain the
- starting number and may contain an increment value
- as well as a picture format.
-
- Example:
-
- Assume that the file had the following contents:
- Increment = 1
- Picture Format = #SSN-AB999C99
- Number = 10079
-
- "Number=" MUST be the LAST line in the file.
-
- The next two calls with the SerialNum function
- would result in #SN-AB100C79 and #SN-AB100C80.
-
- Related Functions:
-
- Abs, Avg, Ceiling, Count, Exp, Floor, Max, Min,
- Mod, Pi, Round, Sqrt, Sum
-
- ^Function Sqrt (n1)
-
- Returns the square root of a given number.
-
- n1 is the number to be evaluated. If a field name is
- used as this parameter, do not enclose it in quotation
- marks.
-
- The result will display up to 6 decimal places.
-
- Examples:
-
- Sqrt(4) return 2
- Sqrt(100) returns 10
-
- Related Functions:
-
- Abs, Avg, Ceiling, Count, Exp, Floor, Lower, Max,
- Min, Mod, Pi, Round, SerialNum, Sqrt, Sum,
- Upper
-
-
- ^Function Sum (n1,[n2],[n3], ..., [n99])
-
- Returns the sum of the specified set of numbers.
-
- n1 is the first value to be summed.
-
- n2 to n99 are optional values in the set of
- numbers to be summed.
-
- If only one parameter is given then it is
- assumed to be a field with multiple occurrences
- in the form. The sum of all occurrences is
- calculated.
-
- Examples:
-
- Sum(1,2,3,4) returns 10
- Sum(ITEMTOTAL) returns the sum of all
- occurrences of the field ITEMTOTAL.
-
- Related Functions:
-
- Abs, Avg, Ceiling, Count, Exp, Floor, Max, Min,
- Mod, Pi, Round, SerialNum, Sqrt
-
-
- ^category Database Access
- ^Function DbFetch (s1, s2, [n1], [s3], [s4])
-
- Retrieves a record from a specified database
- file and stores the data in a buffer.
-
- s1 is the file name enclosed in quotation
- marks.
-
- s2 is the database field name used as a
- key for the retrieval.
-
- n1 is an optional buffer number where the
- retrieved record is saved. If n1 is not
- specified, the default is 1. More than 1
- buffer may be active at any given time.
-
- s3 is the field value to be used in the lookup.
- To look up the value in the current field, use
- $. For the value of another field, use the
- other field's name.
-
- The Concat function can be used to make up this
- string with the values from other fields on the form
- (e.g.,
- Concat(FIELDA,";"FIELDB,";"FIELDC)). If you are
- searching on a date field in a Paradox file, the date
- must be supplied in the format MM/DD/YY.
-
- s4 is an optional database type, defaulting
- to dBASE (DBF). This value must be enclosed in
- quotation marks ("DB"). Current options are:
-
- DBF - standard dBASE III or IV
- JFD - JetForm database format
- DB - Paradox format
-
- Normally used as a validation rule, DbFetch
- returns true (1) if the record is found and
- false (0) if not found. This function also
- sets up the specified buffer so that the
- retrieved data can be used in other fields on
- the form via the DbField function.
-
- Note that the database file and field names must
- be within quotation marks.
-
- Refer to Jetform Functions in the Online Help
- for more information.
-
- Examples:
-
- DbFetch ("VENDORS","VENDNO") looks up the
- value of the current field in the VENDORS dBASE
- file using a sequential search on the VENDNO
- field. The result is stored in buffer 1.
-
- DbFetch ("PARTS","PARTINDX",2) looks up the
- value of the current field in the PARTS dBASE
- file, using an indexed search with the PARTINDX
- index file. The result is stored in buffer 2,
- so that the vendor record and the part record
- can both be accessed from other fields in the
- current form using the DbField function.
-
- DbFetch ("CUSTOMER","CUSTOMRNO",1,$,"DB")
- looks up the value of the current field (specified by
- the $) in the CUSTOMRNO Paradox database file.
- The result is stored in buffer number 1.
-
- Related Functions:
-
- DBField
-
- ^Function DbField ([n1], [s1], [s2])
-
- Retrieves the value for a field from a database
- record previously retrieved via a DbFetch
- function.
-
- n1 specifies the buffer number where the data is
- stored. If not entered, the default is 1.
-
- s1 identifies the database field to be
- retrieved enclose in quotation marks. If not entered,
- the name of the current field is used.
-
- s2 is an optional database type, defaulting to
- dBASE (DBF). This value must be enclosed in
- quotation marks ("DB"). Current options are:
-
- DBF - standard dBASE III or IV
- JFD - JetForm database format
- DB - Paradox format
-
- Option is enclosed in quotation marks.
- Care should be taken that the specified buffer
- number is the same as the buffer number used in
- the corresponding DbFetch function call.
-
- Examples:
-
- DbField( ) (function call for field VENDNAME)
- gets the value of the field VENDNAME from the
- database record stored in buffer 1.
-
- DbField(2,"PARTDESC") (function call for field
- ITEMDESC) gets the value of the field PARTDESC
- from the database record stored in buffer 2.
-
- Related Functions:
-
- DBFetch
-
- ^Function SQLFetch(SQL[,connect[,buffer#[,options
- [,prompt1 [...,prompt99]]]]])
-
- Allows full access to SQL queries and can
- include designer-supplied prompts.
-
- SQL is the required SQL statement. May contain
- embedded prompts.
-
- connect is the ODBC connection string. Default is
- "DSN=dBASE".
-
- buffer# is the buffer where the retrieved data is
- stored. The default is 1.
-
- options is the options string. Use "m" for a dialog
- box with multiple rows matching query. Default is "".
-
- prompt1,...,prompt99 is a comma separated list of
- prompts. Each prompt is in the form:
-
- "name;text;default"
-
- where name is the name of the prompt, text is the
- prompt text, and default is the default value.
-
- Example:
-
- SQLFetch(concat("select emp_id from emp where
- emp_id =",$))
-
- This function retrieves the employee record from
- the dBASE database emp where the key emp_id equals
- the entered value.
-
- Related Functions:
-
- At, Concat, Left, Len, Lower, Ltrim, Oneof,
- Replace, Right, Rtrim, Str, Stuff, Substr,
- Upper, Val, Within, WordNum
-
- ^Function SQLField (buffer#[,column name])
-
- Retrieves the data from the specified bufffer
- that was populated by a SQLFetch function.
-
- buffer# is the buffer number of a previous SQLFetch.
-
- column name is the column name from the
- SQLFetch used to retrieve the value. Note that this
- may be a positional column number starting from 1.
-
- Examples:
-
- The retrieved data (an employee record) from an
- SQLFetch function has by default been stored in
- buffer 1, using the statement:
-
- SQLFetch(concat("select emp_id from emp where
- emp_id =",$),"DSN=dBASE")
-
- This statement will retrieve the data from buffer 1:
-
- SQLField (1,1)
-
- The data is retrieved from buffer 1, starting at column
- 1.
-
- Related Functions:
-
- SQLFetch
-
- ^category Date and Time
- ^Function Cdow ([d1], [n1])
-
- Returns the character string for the day of the week
- (Monday, Tuesday, etc.) from a date string.
-
- d1 is the date string in the format specified by
- the parameter n1. If no d1 parameter is
- specified, the current system date is used.
-
- n1 identifies the date format as one of the
- following.
-
- 1 - YYMMDD
- 2 - MM/DD/YY (default value)
- 3 - MM-DD-YY
- 8 - DD/MM/YY
- 9 - DD-MM-YY
-
- Examples:
-
- Cdow("17/03/89",8) returns "Friday"
- Cdow("03/18/89") returns "Saturday"
- Cdow("890319",1) returns "Sunday"
- Cdow() returns the day of the week for the
- current system date.
-
- Related Functions:
-
- Cmonth, Date2num, DateArith, DateDiff,
- Dow, Month, Num2date, Time, Today, Year
-
- ^Function Cmonth ([d1], [n1])
-
- Returns the character string for the month
- (January, February, etc.) from a date string.
-
- d1 is the date string in the format specified by
- the parameter n1. If no d1 parameter is
- specified, the current system date is used.
-
- n1 identifies the date format as one of the
- following:
-
- 1 - YYMMDD
- 2 - MM/DD/YY (default)
- 3 - MM-DD-YY
- 8 - DD/MM/YY
- 9 - DD-MM-YY
-
- Examples:
-
- Cmonth ("890201",1) returns "February"
- Cmonth ("03/04/89") returns "March"
- Cmonth ("03/04/89",8) returns "April"
- Cmonth () returns the month for the current
- system date.
-
- Related Functions:
-
- Cdow, Date2num, DateArith, DateDiff,
- Dow, Month, Num2date, Time, Today, Year
-
- ^Function Date2num ([d1], [n1])
-
- Converts a date value to a number. The number
- returned is the number of days since January 1,
- 1900.
- The function can be used when performing date
- validations or as part of a date arithmetic
- calculation.
-
- d1 is a date string. If d1 is not specified, the
- current system date is used.
-
- n1 identifies the date format:
-
- 1 - YYMMDD
- 2 - MM/DD/YY (default)
- 3 - MM-DD-YY
- 8 - DD/MM/YY
- 9 - DD-MM-YY
-
- If the date is not valid in the specified
- format, then a value of 0 is returned. This
- allows Date2num to be used as a validation
- rule to ensure that a valid date is entered.
-
- Examples:
-
- Date2num("01/01/00",8) returns 1
- Date2num("03/15/89") returns 32582
- Date2num(FIELDA,1) returns 32583 when the value
- of FIELDA is "890316".
-
- The previous examples have limited practical
- use when used alone. However the Date2num
- function can be extremely useful when combined
- with the Num2date function to add dates together.
-
- For example, an invoice form may have a field called
- TODAYS_DATE that contains the issue date of
- the invoice. The payment date is a field called
- PAY_DATE, that is 30 days from the issue date.
- The payment date can be calculated automatically
- with the Num2date and Date2num functions:
-
- Num2date ( Date2num ( TODAYS_DATE) + 30)
-
- This calculation uses Date2num and converts
- TODAYS_DATE to a number. The numeric
- constant 30 is added to this number. The function
- Num2date uses the sum of TODAYS_DATE plus
- 30 and converts it from a number back to
- recognizable date.
-
- Related Functions:
-
- Cdow, Cmonth, DateArith, DateDiff,
- Dow, Month, Num2date, Time, Today, Year
-
- ^Function DateArith (d1, n1, n2)
-
- This function adds n2 days to the date specified
- in d1.
-
- n1 identifies the date format.
-
- d1 is a date in the format specified by
- n1. The result is a date in the format specified
- by n1.
-
- The date format can be one of the following:
-
- 1 yymmdd
- 2 mm/dd/yy (default)
- 3 mm-dd-yy
- 8 dd/mm/yy
- 9 dd-mm-yy
-
- Example:
-
- DateArith(Today(3),3,JF02)
-
- Takes today's date in mm-dd-yy format, adds the
- number in field JF02, and returns a date in
- mm-dd-yy format.
-
- Note that if the number in field JF02 is
- negative, the date returned is a date in the
- past.
-
- Related Functions:
-
- Cdow, Cmonth, Date2num, DateDiff,
- Dow, Month, Num2date, Time, Today, Year
-
- ^Function DateDiff (d1, n1, d2, [n2])
-
- This function computes the number of days
- difference between d1 and d2.
-
- n1 identifies the date format. d1 is a date in the
- format specified by n1. d2 is a date in the format
- specified by n2 if n2 exists, or in the format specified
- by n1 if n2 does not exist.
-
- The date format can be one of the following:
-
- 1 yymmdd
- 2 mm/dd/yy (default)
- 3 mm-dd-yy
- 8 dd/mm/yy
- 9 dd-mm-yy
-
- Example:
-
- DateDiff(JF05,2,JF07,3)
-
- Takes a date in mm/dd/yy format from field JF05,
- and a date in mm-dd-yy format from field JF07,
- and returns the difference between the two
- dates.
-
- Related Functions:
-
- Cdow, Cmonth, Date2num, DateArith,
- Dow, Month, Num2date, Time, Today, Year
-
- ^Function Dow ([d1], [n1])
-
- Returns the number of the day of the week where
- 0 is Sunday, 1 is Monday, etc.
-
- d1 is the date string in the format specified by
- the parameter n1. If no d1 parameter is
- specified, the current system date is used.
-
- n1 identifies the date format as one of the
- following:
-
- 1 - YYMMDD
- 2 - MM/DD/YY (default)
- 3 - MM-DD-YY
- 8 - DD/MM/YY
- 9 - DD-MM-YY
-
- Examples:
-
- Dow("17/03/89",8) returns 5
- Dow("03/18/89") returns 6
- Dow ("890319",1) returns 0
- Dow () returns the day of the week for the
- current system date.
-
- Related Functions:
-
- Cdow, Cmonth, Date2num, DateArith, DateDiff,
- Month, Num2date, Time, Today, Year
-
- ^Function Month ([d1], [n1])
-
- Returns the month number (1, 2, 3, etc.) for a
- date string.
-
- d1 is the date string in the format specified by
- the parameter n1. If no d1 parameter is
- specified, the current system date is used.
- If you use a field name for this parameter, do
- not enclose it in quotation marks.
-
- n1 identifies the date format as one of the
- following.
-
- 1 - YYMMDD
- 2 - MM/DD/YY (default)
- 3 - MM-DD-YY
- 8 - DD/MM/YY
- 9 - DD-MM-YY
-
- Examples:
-
- Month("890201",1) returns 2
- Month("03/04/89") returns 3
- Month("03/04/89") returns 4
- Month(DATE,3) returns 8 when DATE is a field with
- a current value of 08-29-91.
- Month() returns the month number for the current
- system date.
-
- Related Functions:
-
- Cdow, Cmonth, Date2num, DateArith, DateDiff,
- Dow, Num2date, Time, Today, Year
-
- ^Function Num2date (n1, [n2])
-
- Converts a number to a date. The number used
- is the number of days since January 1, 1900.
-
- n1 is the number to be evaluated. The date
- returned is in the format specified by n2.
-
- n2 identifies the date format as one of the
- following.
-
- 1 - yymmdd
- 2 - mm/dd/yy (default)
- 3 - mm-dd-yy
- 4 - Mmm dd, yyyy
- 5 - Mmm..m dd, yyyy
- 6 - dd Mmm yy
- 7 - dd Mmm yyyy
- 8 - dd/mm/yy
- 9 - dd-mm-yy
- 10 - mmm dd, yyy
- 11 - m..m dd, yyyy
- 12 - dd mmm yy
- 13 - dd mmm yyyy
-
- Note that formats 10 to 13 inclusive use French
- month names.
-
- This function can be used in conjunction with
- the Date2num function to perform date
- arithmetic.
-
- Examples:
-
- Num2date(1,8) returns "01/01/00"
- Num2date(2,1) returns "000102"
- Num2date(32582) returns "03/15/89"
-
- To calculate the date 10 days after the date entered
- in the field PODATE, use the following calculation
- rule:
-
- Num2date(Date2num(PODATE)+10)
-
- Related Functions:
-
- Cdow, Cmonth, Date2num, DateArith, DateDiff,
- Dow, Month, Time, Today, Year
-
- ^Function Time ()
-
- Returns the current system time as "hh:mm:ss"
- based on a 24-hour clock.
-
- Related Functions:
-
- Cdow, Cmonth, Date2num, Dow, Month,
- Num2date, Today, Year
-
- ^Function Today ([n1])
-
- Returns the current system date.
-
- n1 identifies the date format as one of the
- following:
-
- 1 - yymmdd
- 2 - mm/dd/yy (default)
- 3 - mm-dd-yy
- 4 - Mmm dd, yyyy
- 5 - Mmm..m dd, yyyy
- 6 - dd Mmm yy
- 7 - dd Mmm yyyy
- 8 - dd/mm/yy
- 9 - dd-mm-yy
- 10 - mmm dd, yyy
- 11 - m..m dd, yyyy
- 12 - dd mmm yy
- 13 - dd mmm yyyy
-
- Note that formats 10 to 13 inclusive use French
- month names.
-
- Related Functions:
-
- Cdow, Cmonth, Date2num, Dow, Month,
- Num2date, Time, Year
-
- ^Function Year ([d1], [n1])
-
- Returns the year for a given date.
-
- d1 is the date to be evaluated. If not
- specified, the current system date is used.
-
- n1 identifies the date format as one of the
- following.
-
- 1 - YYMMDD
- 2 - MM/DD/YY (default)
- 3 - MM-DD-YY
- 8 - DD/MM/YY
- 9 - DD-MM-YY
-
- Examples:
-
- Year() returns "1991"
- Year("880803",1) returns "1988"
- Year("03/08/45",8) returns "1945"
- Year() returns the year for the current system
- date.
-
- Related Functions:
-
- Cdow, Cmonth, Date2num, DateArith, DateDiff,
- Dow, Month, Num2date, Time, Today
-
- ^category Filler Environment
- ^Function Data ()
-
- Returns the fully qualified DOS file name of the
- current data file. No parameters are required. A string
- containing the name of the current data file is
- returned.
-
- Related Functions:
-
- DocVar, Form, Getenv, GetProfile,
- Info, SetProfile, Version
-
- ^Function DocVar (s1)
-
- Returns the Form Documentation variable value from
- the JFDESIGN.INI file, if the Form Documentation
- section of the file has been set.
-
- s1 is the variable name from the JFDESIGN.INI file,
- which may be one of:
-
- FormName
- Description
- Designer
- Contact
- CreationDate
- CustomName
- CustomValue
- Version
- VersionDate
- MessageType
-
- Examples:
-
- DocVar(FormName) returns "Fax_Form"
- DocVar(Designer) returns "J. Smith Accounting"
-
- Related Functions:
-
- Data, Form, Getenv, GetProfile,
- Info, SetProfile, Version
-
- ^Function Form ()
-
- Returns the name of the current form file. No
- parameters are required.
-
- Related Functions:
-
- Data, DocVar, Getenv, GetProfile,
- Info, SetProfile, Version
-
- ^Function Getenv (s1)
-
- Returns the current value of the string for a specified
- DOS environment variable.
-
- s1 is the environment variable name, which must be
- enclosed in quotation marks..
-
- Example:
-
- If before running JetForm Filler the following DOS
- commands are executed:
-
- SET ENVA="AAA"
- SET ENVB=99
-
- This sets values for the environment variables ENVA
- and ENVB.
-
- Getenv("ENVA") will return "AAA".
- Getenv("ENVB") will return 99.
-
- This function can be used, for example, with the
- If function to modify a calculation based on a
- value set up in a DOS environment variable.
-
- Related Functions:
-
- Data, DocVar, Form, GetProfile,
- Info, SetProfile, Version
-
- ^Function GetProfile (KeyWord, [Section], [File])
-
- This function gets a value from a Windows .INI file.
- If no Section is specified, the function uses
- the [User] section of the .INI file. If no File is
- specified, the function defaults to JFILLER.INI if the
- form is being filled in JetForm Filler.
-
- Example:
-
- GetProfile("ExePath","Paths","JFILLER.INI)
-
- returns the path where JetForm Filler expects
- to find program files.
-
- Related Functions:
-
- Data, DocVar, Form, Getenv,
- Info, SetProfile, Version
-
- ^Function Info (n1, [s1], [n2])
-
- Returns internal field and form related data.
-
- n1 is an option code, specifying which data is
- returned. Refer to the table below.
-
- s1 is an option string. It represents a field name
- If it is not specified, the current field is used.
-
- n2 is an optional numeric value. It represents
- a field occurrence number. If it is not specified,
- the first occurrence of the named field is used.
-
- Option Codes for n1
-
- 1 return the field name
- 2 return the occurrence number of the field
- on the page
- 3 return the number of occurrences of the
- field name which are on the current page
- 4 return the field tabbing sequence number
- (The order in which the fields are
- prompted.)
- 5 return the error message text for the field
- 6 return the help text for the field
- 7 return the number of characters for the
- field
- 8 return the number of lines for the field
-
- Option Codes 100 - 199 are general, non-field
- related. If used, parameters s1 and n2 are ignored.
-
- 101 return the page number within the
- document that is being processed
- 102 return the total number of pages in the
- document
- 103 return the current data record that is being
- processed
- 104 return the total number of records in the
- current data file
- 105 return the full file name of the compiled
- form (MDF) being processed
- 106 return the logical Form Name of the
- compiled form
- 107 return the Form Description of the compiled
- form
-
- Related Functions:
-
- Data, DocVar, Form, Getenv, GetProfile,
- SetProfile, Version
-
- ^Function SetProfile (String,KeyWord,[Section],[File])
-
- This function sets a value in a Windows .INI file.
- String is the value to be inserted to the right of the
- equal sign. KeyWord is the word on the left side
- of the .INI file, equal sign. Section is the word in
- square brackets [] in the .INI file. If no section is
- specified, the function uses the [User] section of the
- .INI file. If no File is specified, the function uses
- JFILLER.INI to specify that the form is being filled in
- JetForm Filler.
-
- For example:
- When running JetForm Filler, the function:
-
- SetProfile("c:\demo","ExePath","Paths")
-
- accesses JFILLER.INI and sets the path where
- JetForm Filler expects to find program files.
-
- Related Functions:
-
- Data, DocVar, Form, Getenv, GetProfile,
- Info, Version
-
- ^Function Version ()
-
- Returns the current JetForm version number.
-
- Example:
-
- Version( ) returns "Version 4.00 (B5)".
-
- Related Functions:
-
- Data, DocVar, Form, Getenv, GetProfile,
- Info, SetProfile
-
-
- ^category Field Control and Manipulation
- ^Function Access ([f1], [n1], [n2])
-
- Returns the value of a given field as a
- character string.
-
- f1 is the name of the field.
-
- n1 is the record number in the data file. The
- default is 0, the current record. Negative values
- select relative to the current record: -1 selects
- the previous record, +1 selects the next record.
- Note that if the + and - signs are omitted,
- JetForm uses n1 as an absolute record number.
- For example, if n1 is 4 then JetForm will
- reference the fourth record in the data file.
-
- n2 is the field occurrence number in the record.
- The default is the first occurrence, 1. If the field
- occurs more than once in the record, n2 identifies
- the occurrence to fetch. 1 indicates the first
- occurrence, 2 the second occurrence, and so on.
-
- If you are referring to fields on the current page of
- a form for the current record, you do not need to
- use the ACCESS function because you can
- reference the field directly.
-
- Examples:
-
- Access("FIELDA",-1) gets the value of FIELDA
- from the previous record in the data file.
-
- Access("PONO") gets the value of PONO from the
- current record, maybe from the previous page on
- the form.
-
- Access("FIELDB",-1,3) gets the value of third
- occurrence of the FIELDB from the previous record in
- the data file.
-
- Access("FIELDC",4,1) gets the value of first
- occurrence of FIELDB from the fourth record in the
- data file.
-
- Access("Number",-1) + 1 gets the value of NUMBER
- from the previous record and adds 1 to it. This
- would be useful to automatically increment a numeric
- field from record to record.
-
- Related Functions:
-
- Abs, Ceiling, Count, Exp, Floor, Max, Min, Mod
- Pi, Round, SerialNum, Sqrt, Sum
-
- ^Function Command (s1)
-
- Executes a JetForm Filler command, identified by its
- menu text string. Command returns 1 if the command
- is a valid command name, and 0 if the command is
- not a valid command name. This function is intended
- for use with Action Button fields.
-
- s1 represents a valid JetForm Filler menu/command
- enclosed in quotation marks. or a field name
- containing the command. Except for case and
- accelerator underlining you must provide the
- command exactly as it appears on the Filler menu,
- including ellipsis ("file/print..."). Menu is optional and
- is required only when using ambigous (duplicate)
- command names.
-
- All JetForm Filler commands are available. If a
- command name appears multiple times in JetForm
- Filler (Delete), the first instance takes precedence
- unless it is qualified with the menu name. If the
- command is not currently enabled, the request is
- ignored.
-
- Example:
-
- Command ("JetNotes/Delete")
-
- Related Functions:
-
- SetValue, SetLabel
-
- ^Function GetMandatory (field)
-
- Returns a numeric value indicating if the designated
- field has been specified as a mandatory field, which
- must be completed at data entry. The return values
- are:
- 0 = Off
- 1 = On
-
- Fields are identified by field name, enclosed in
- quotation marks. Any field name may have an
- an occurrence number appended to it. The following
- formats are supported:
-
- JF01[2] - Second occurrence of field JF01.
- JF02[-1] - Previous occurrence of field JF02.
- JF03[+1] - Next occurrence of field JF03.
- JF04[*] - All occurrences of field JF04.
-
- Example:
-
- GetMandatory("JF01[1]")
-
- Returns the status of the mandatory
- attribute for the first occurrence of field JF01.
- If the field is designated as mandatory, the
- function returns 1. If not, the function returns 0.
-
- Related Functions:
-
- Access, GetMessage, GetNumeric,
- GetOverride, GetProtect, GetValue, GetVisible,
- GetWarning, LockFields, ResetOverride,
- SetMandatory, SetMessage, SetNumeric,
- SetOverride, SetProtect, SetValue, SetVisible,
- SetWarning
-
- ^Function GetMessage (field)
-
- Returns the custom error message text for the
- designated field.
-
- Fields are identified by field name, enclosed in
- quotation marks. Any field name may have an
- occurrence number appended to it. The following
- formats are supported:
-
- JF01[2] - Second occurrence of field JF01.
- JF02[-1] - Previous occurrence of field JF02.
- JF03[+1] - Next occurrence of field JF03.
- JF04[*] - All occurrences of field JF04.
-
- Example:
-
- GetMessage("JF01[1]")
-
- Returns the custom error message text
- for the first occurrence of field JF01.
-
- Related Functions:
-
- Access, GetMandatory, GetNumeric,
- GetOverride, GetProtect, GetValue, GetVisible,
- GetWarning, LockFields, ResetOverride,
- SetMandatory, SetMessage, SetNumeric,
- SetOverride, SetProtect, SetValue, SetVisible,
- SetWarning
-
- ^Function GetNumeric (field)
-
- Returns a numeric value indicating if the designated
- field has been specified as a numeric field, which
- must be filled with numeric data. The return values
- are:
- 0 = Off (field is not numeric)
- 1 = On (field is numeric)
-
- Fields are identified by field name, enclosed in
- quotation marks. Any field name may have an
- occurrence number appended to it. The following
- formats are supported:
-
- JF01[2] - Second occurrence of field JF01.
- JF02[-1] - Previous occurrence of field JF02.
- JF03[+1] - Next occurrence of field JF03.
- JF04[*] - All occurrences of field JF04.
-
- Example:
-
- GetNumeric("JF01[1]")
-
- Returns the status of the numeric attribute
- for the first occurrence of field JF01. If the field
- is designated as numeric, the value 1 is returned.
- If not, the value 0 is returned.
-
- Related Functions:
-
- Access, GetMandatory, GetMessage,
- GetOverride, GetProtect, GetValue, GetVisible,
- GetWarning, LockFields, ResetOverride,
- SetMandatory, SetMessage, SetNumeric,
- SetOverride, SetProtect, SetValue, SetVisible,
- SetWarning
-
- ^Function GetOverride (field)
-
- Returns a numeric value indicating whether the
- designated field has a calculation that can be
- overridden during data entry. The return values
- are:
- 0 = Off (no override permitted)
- 1 = On (override permitted)
-
- Fields are identified by field name, enclosed in
- quotation marks. Any field name may have an
- occurrence number appended to it. The following
- formats are supported:
-
- JF01[2] - Second occurrence of field JF01.
- JF02[-1] - Previous occurrence of field JF02.
- JF03[+1] - Next occurrence of field JF03.
- JF04[*] - All occurrences of field JF04.
-
- Example:
-
- GetOverride("JF01[1]")
-
- This returns the status of the calculation override
- attribute for the first occurrence of field JF01. If
- the field has a calculation that can be overridden at
- data entry, the value 1 is returned. If not, 0 is
- returned.
-
- Related Functions:
-
- Access, GetMandatory, GetMessage, GetNumeric,
- GetProtect, GetValue, GetVisible, GetWarning
- LockFields, ResetOverride, SetMandatory,
- SetMessage, SetNumeric, SetOverride, SetProtect,
- SetValue, SetVisible, SetWarning
-
- ^Function GetProtect (field)
-
- Returns a numeric value indicating if the designated
- field is specified as a protected field which cannot
- be entered during data entry. The return values are:
- 0 = Off (field not protected)
- 1 = On (field is protected)
-
- Fields are identified by field name, enclosed in
- quotation marks. Any field name may have an
- occurrence number appended to it. The following
- formats are supported:
-
- JF01[2] - Second occurrence of field JF01.
- JF02[-1] - Previous occurrence of field JF02.
- JF03[+1] - Next occurrence of field JF03.
- JF04[*] - All occurrences of field JF04.
-
- Example:
-
- GetProtect("JF01[1]")
-
- This returns the status of the protected attribute
- for the first occurrence of field JF01. If the field is
- designated as a protected field, the value 1 is
- returned. If not, the value 0 is returned.
-
- Related Functions:
-
- Access, GetMandatory, GetMessage, GetNumeric,
- GetOverride, GetValue, GetVisible, GetWarning,
- LockFields, ResetOverride, SetMandatory,
- SetMessage, SetNumeric, SetOverride, SetProtect,
- SetValue, SetVisible, SetWarning
-
- ^Function GetValue (field)
-
- Returns the current value of the designated
- field.
-
- Fields are identified by field name, enclosed
- in quotation marks. Any field name may have
- an occurrence number appended to it. The
- following formats are supported:
-
- JF01[2] - Second occurrence of field JF01.
- JF02[-1] - Previous occurrence of field JF02.
- JF03[+1] - Next occurrence of field JF03.
- JF04[*] - All occurrences of field JF04.
-
- Example:
-
- GetValue("JF01[-1]")
-
- This returns the current value of the previous
- occurrence of field JF01.
-
- Related Functions:
-
- Access, GetMandatory, GetMessage, GetNumeric,
- GetOverride, GetProtect, GetVisible, GetWarning,
- LockFields, ResetOverride, SetMandatory,
- SetMessage, SetNumeric, SetOverride, SetProtect,
- SetValue, SetVisible, SetWarning
-
- ^Function GetVisible (field)
-
- Returns a numeric value indicating if the designated
- field is a visible field. The return values are:
-
- 0 = Off (field is not visible)
- 1 = On (field is visible)
-
- Fields are identified by the field name, enclosed
- in quotation marks. Any field name may have
- an occurrence number appended to it. The
- following formats are supported:
-
- JF01[2] - Second occurrence of field JF01.
- JF02[-1] - Previous occurrence of field JF02.
- JF03[+1] - Next occurrence of field JF03.
- JF04[*] - All occurrences of field JF04.
-
- Example:
-
- GetVisible("JF01[1]")
-
- If the first occurrence of field JF01 has been
- designated as visible, the value 1 is
- returned. If not the value 0 is returned.
-
- Related Functions:
-
- Access, GetMandatory, GetMessage, GetNumeric,
- GetOverride, GetProtect, GetValue, GetWarning,
- LockFields, ResetOverride, SetMandatory,
- SetMessage, SetNumeric, SetOverride, SetProtect,
- SetValue, SetVisible, SetWarning
-
- ^Function GetWarning (field)
-
- Returns a numeric value indicating if the designated
- field is specified as displaying a warning if left empty
- during data entry. The return values are:
- 0 = Off (No warning issued)
- 1 = On (Warning displays)
-
- Fields are identified by field name, enclosed
- in quotation marks. Any field name may have
- an occurrence number appended to it. The
- following formats are supported:
-
- JF01[2] - Second occurrence of field JF01.
- JF02[-1] - Previous occurrence of field JF02.
- JF03[+1] - Next occurrence of field JF03.
- JF04[*] - All occurrences of field JF04.
-
- Example:
-
- GetWarning("JF01[1]")
-
- This returns the status of the "warn if empty"
- attribute for the first occurrence of field JF01.
- If the field has been designated as warn if empty,
- the value 1 is returned. If not, 0 is returned.
-
- Related Functions:
-
- Access, GetMandatory, GetMessage, GetNumeric,
- GetOverride, GetProtect, GetValue, GetVisible,
- LockFields, ResetOverride, SetMandatory,
- SetMessage, SetNumeric, SetOverride, SetProtect,
- SetValue, SetVisible, SetWarning
-
- ^Function LockFields (n1, "f1", ..., "f99")
-
- Specifies the locked fields for a Signature field. This
- calculation is created internally for electronic
- signature
- fields when the Lock Fields option is selected.
-
- n1 identifies the display options from the Signature
- field,
- 1 for Unique Id,
- 2 for Signature Text
- 3 for Additional Information.
-
- f1 to f99 are the field names for the Lock Fields.
- The field names must be enclosed in quotation
- marks and separated by commas.
-
- Examples:
-
- LockFields(2,"FIELDA","FIELDB","FIELDC")
-
- specifies that the Signature field value displayed is
- the Signature Text, and the locked fields are FIELDA,
- FIELDB, and FIELDC.
-
- Related Functions:
-
- Access, GetMandatory, GetMessage, GetNumeric,
- GetOverride, GetProtect, GetValue, GetVisible,
- GetWarning, ResetOverride, SetMandatory,
- SetMessage, SetNumeric, SetOverride, SetProtect,
- SetValue, SetVisible, SetWarning
-
- ^Function ResetOverride (f1, f2, f3, ..., f99)
-
- Resets the flag indicating that the specified calculated
- fields have been overridden by the user.
-
- f1 ... f99 are the affected fields.
-
- The fields are identified by field name, enclosed in
- quotation marks. Any field name may have an
- occurrence number appended to it. The following
- formats are supported:
-
- JF01[2] - Second occurrence of field JF01.
- JF02[-1] - Previous occurrence of field JF02.
- JF03[+1] - Next occurrence of field JF03.
- JF04[*] - All occurrences of field JF04.
-
- Example:
-
- ResetOverride("JF01[2]", "JF04[*]")
-
- This resets on the override flag for the second
- occurrence of field JF01 and all occurrences
- of field JF04.
-
- Related Functions:
-
- Access, GetMandatory, GetMessage, GetNumeric,
- GetOverride, GetProtect, GetValue, GetVisible,
- GetWarning, LockFields, SetMandatory,
- SetMessage, SetNumeric, SetOverride, SetProtect,
- SetValue, SetVisible, SetWarning
-
- ^Function SetNumeric (n1, f1, f2, f3, ..., f99)
-
- Sets the specified fields to require numeric data
- as indicated by the value of the first parameter.
-
- n1 is the setting (zero = off, non-zero = on)
- f1 ... f99 are the affected fields.
-
- The fields are identified by field name, enclosed
- in quotation marks. Any field name may have an
- occurrence number appended to it. The following
- formats are supported:
-
- JF01[2] - Second occurrence of field JF01.
- JF02[-1] - Previous occurrence of field JF02.
- JF03[+1] - Next occurrence of field JF03.
- JF04[*] - All occurrences of field JF04.
-
-
- Example:
-
- SetNumeric(1, "JF01[*]")
-
- This makes all occurrences of JF01 numeric
- fields.
-
- Related Functions:
-
- Access, GetMandatory, GetMessage, GetNumeric,
- GetOverride, GetProtect, GetValue, GetVisible,
- GetWarning, LockFields, ResetOverride,
- SetMandatory, SetMessage, SetOverride,
- SetProtect, SetValue, SetVisible, SetWarning
-
- ^Function SetLabel (s1, f1, f2, f3, ..., f99)
-
- Dynamically changes the label on an Action Button.
-
- s1 is the label string for the button.
-
- f1, f2, f3 identify the affected fields.
-
- Note that the label string and field names must be
- enclosed in quotation marks. Any field name may
- have an occurrenct number appended to it. The
- following formats are supported:
-
- JF01[2] - Second occurrence of field JF01.
- JF02[-1] - Previous occurrence of field JF02.
- JF03[+1] - Next occurrence of field JF03.
- JF04[*] - All occurrences of field JF04.
-
- Example:
-
- SetLabel ("Print...", "Done_Button")
-
- Related Functions:
-
- SetValue
-
- ^Function SetMandatory (n1, f2, f3, ..., f99)
-
- Sets the specified fields to be mandatory
- when value for n1 is non-zero.
-
- n1 is the setting (zero = off, non-zero = on)
- f1 ... f99 are the affected fields.
-
- The fields are identified by field name, enclosed
- in quotation marks. Any field name may have an
- occurrence number appended to it. The following
- formats are supported:
-
- JF01[2] - Second occurrence of field JF01.
- JF02[-1] - Previous occurrence of field JF02.
- JF03[+1] - Next occurrence of field JF03.
- JF04[*] - All occurrences of field JF04.
-
- Example:
-
- SetMandatory(1, "JF01[2]")
-
- This makes the second occurrence of JF01 a
- mandatory field which must have a value entered.
-
- Related Functions:
-
- Access, GetMandatory, GetMessage, GetNumeric,
- GetOverride, GetProtect, GetValue, GetVisible,
- GetWarning, LockFields, ResetOverride,
- SetMessage, SetNumeric, SetOverride, SetProtect,
- SetValue, SetVisible, SetWarning
-
- ^Function SetMessage (s1, f1, f2, f3, ..., [f99])
-
- Changes the error message text for the specified
- fields. This text replaces any message text already
- defined for the fields.
-
- s1 is the new message text.
-
- f1 ... f99 are the affected fields.
-
- The fields are identified by field name, enclosed in
- quotation marks. Any field name may have an
- occurrence number appended to it. The following
- formats are supported:
-
- JF01[2] - Second occurrence of field JF01.
- JF02[-1] - Previous occurrence of field JF02.
- JF03[+1] - Next occurrence of field JF03.
- JF04[*] - All occurrences of field JF04.
-
- Example:
-
- SetMessage("Contact System Manager,"JF01[*]")
-
- This changes the custom error message for all
- occurrences of field JF01.
-
- Related Functions:
-
- Access, GetMandatory, GetMessage, GetNumeric,
- GetOverride, GetProtect, GetValue, GetVisible,
- GetWarning, LockFields, ResetOverride,
- SetMandatory, SetNumeric, SetOverride,
- SetProtect, SetValue, SetVisible, SetWarning
-
- ^Function SetOverride (n1, "f1", "f2", "f3", ..., "f99")
-
- Switches on or off the ability to override
- calculations in designated fields.
-
- n1 is the setting.
-
- Non-zero value switches on the
- ability to override the calculation. A zero value
- switches off the ability to override the calculation.
-
- f1 ... f99 are the affected fields.
-
- The fields are identified by field name, enclosed
- in quotation marks. Any field name may have an
- occurrence number appended to it. The following
- formats are supported:
-
- JF01[2] - Second occurrence of field JF01.
- JF02[-1] - Previous occurrence of field JF02.
- JF03[+1] - Next occurrence of field JF03.
- JF04[*] - All occurrences of field JF04.
-
- Example:
-
- SetOverride(0, "JF01[*]", "JF05[+2]")
-
- A zero value toggles off the ability to override the
- calculations in all occurrences of field JF01, and
- in the next occurrence of field JF05.
-
- Related Functions:
-
- Access, GetMandatory, GetMessage, GetNumeric,
- GetOverride, GetProtect, GetValue, GetVisible,
- GetWarning, LockFields, ResetOverride,
- SetMandatory, SetMessage, SetNumeric,
- SetProtect, SetValue, SetVisible, SetWarning
-
- ^Function SetProtect (n1, "f1","f2","f3", ..., "f99")
-
- Switches on or off the protected attribute
- for the designated fields.
-
- n1 is the setting (zero = off, non-zero = on).
- f1 ... f99 are the affected fields.
-
- The fields are identified by field name, enclosed in
- quotation marks. Any field name may have an
- occurrence number appended to it. The following
- formats are supported:
-
- JF01[2] - Second occurrence of field JF01.
- JF02[-1] - Previous occurrence of field JF02.
- JF03[+1] - Next occurrence of field JF03.
- JF04[*] - All occurrences of field JF04.
-
- Example:
-
- SetProtect(1, "JF01[-1]")
-
- This makes the previous occurrence of field
- JF01 a protected field.
-
- Related Functions:
-
- Access, GetMandatory, GetMessage, GetNumeric,
- GetOverride, GetProtect, GetValue, GetVisible,
- GetWarning, LockFields, ResetOverride,
- SetMandatory, SetMessage, SetNumeric,
- SetOverride, SetValue, SetVisible, SetWarning
-
- ^Function SetValue (s1, "f1","f2","f3", ..., "99")
-
- Sets the contents of the designated fields to
- a specified value.
-
- s1 is the value.
- f1 ... f99 are the affected fields.
-
- Picture processing, where applicable, will be applied.
- The fields are identified by field name, enclosed in
- quotation marks. Any field name may have an
- occurrence number appended to it. The following
- formats are supported:
-
- JF01[2] - Second occurrence of field JF01.
- JF02[-1] - Previous occurrence of field JF02.
- JF03[+1] - Next occurrence of field JF03.
- JF04[*] - All occurrences of field JF04.
-
- Example:
-
- SetValue("Final Sale", "JF01[2]")
-
- This sets the contents the second occurrence of
- JF01 to the string Final Sale.
-
- Related Functions:
-
- Access, GetMandatory, GetMessage, GetNumeric,
- GetOverride, GetProtect, GetValue, GetVisible,
- GetWarning, LockFields, ResetOverride,
- SetMandatory, SetMessage, SetNumeric,
- SetOverride, SetProtect, SetVisible, SetWarning
-
- ^Function SetVisible (n1, "f1","f2","f3", ..., "f99")
-
- Sets the designated fields to be visible or invisible.
-
- n1 is the setting (zero = invisible, non-zero = visible).
-
- f1 ... f99 are the affected fields.
-
- The fields are identified by field name, enclosed in
- quotation marks. Any field name may have an
- occurrence number appended to it. The following
- formats are supported:
-
- JF01[2] - Second occurrence of field JF01.
- JF02[-1] - Previous occurrence of field JF02.
- JF03[+1] - Next occurrence of field JF03.
- JF04[*] - All occurrences of field JF04.
-
- Example:
-
- SetVisible(0, "JF01")
-
- This makes the field JF01 an invisible field.
-
- Related Functions:
-
- Access, GetMandatory, GetMessage, GetNumeric,
- GetOverride, GetProtect, GetValue, GetVisible,
- GetWarning, LockFields, ResetOverride,
- SetMandatory, SetMessage, SetNumeric,
- SetOverride, SetProtect, SetValue, SetWarning
-
- ^Function SetWarning (n1, "f1","f2","f3", ..., "f99")
-
- Sets the specified fields to display a warning if left
- blank, as indicated by the value of the first parameter.
-
- n1 is the setting (zero = off, non-zero = on)
-
- A zero value in n1 indicates no message. A non-zero
- value indicates that a message is to be displayed.
-
- f1 ... f99 are the affected fields.
-
- The fields are identified by field name, enclosed in
- quotation marks. Any field name may have an
- occurrence number appended to it. The following
- formats are supported:
-
- JF01[2] - Second occurrence of field JF01.
- JF02[-1] - Previous occurrence of field JF02.
- JF03[+1] - Next occurrence of field JF03.
- JF04[*] - All occurrences of field JF04.
-
- Example:
-
- SetWarning(1, "JF01[2]")
-
- This makes the second occurrence of JF01 display
- a warning message if left blank during data entry.
-
- Related Functions:
-
- Access, GetMandatory, GetMessage, GetNumeric,
- GetOverride, GetProtect, GetValue, GetVisible,
- GetWarning, LockFields, ResetOverride,
- SetMandatory, SetMessage, SetNumeric,
- SetOverride, SetProtect, SetValue, SetVisible
-
- ^category Financial
- ^Function Apr (n1, n2, n3)
-
- Computes the annual percentage rate for a loan.
-
- n1 is the principal amount of the loan.
- n2 is the payment on the loan.
- n3 is the number of periods.
-
- Example:
-
- Apr(35000, 269.50, 360) returns .08515 (8.515%)
- This is the annual interest rate on a loan of
- $35,000 being repaid at $269.50 per month over
- 30 years (360 months).
-
- Related Functions:
-
- CTerm, FV, IPmt, NPV, Pmt, PPmt, PV, Rate,
- Term
-
- ^Function CTerm (n1, n2, n3)
-
- Computes the number of periods needed for an
- investment earning a fixed, but compounded,
- interest rate to grow to a future value.
-
- n1 is the annual interest rate
- n2 is the future value of the investment
- n3 is the amount of the initial investment
-
- Example:
-
- CTerm(.02, 200, 100) returns 35. One hundred
- dollars ($100) invested at 2% would require
- 35 periods to grow to $200.
-
- Related Functions:
-
- Apr, FV, IPmt, NPV, Pmt, PPmt, PV, Rate, Term
-
- ^Function FV (n1, n2, n3)
-
- Computes the future value of a series of equal
- payments at a fixed interest rate.
-
- n1 is the amount of each equal payment.
- n2 is the interest rate for the period.
- n3 is the number of periods.
-
- Example:
-
- FV(100, .00625, 120) returns 17793.03.
-
- If $100 is paid each month for 120 periods
- into an account bearing interest at 7.5%
- (.075/12) per period, the account will contain
- $17,793.03 at the end of the 10 periods.
-
- Related Functions:
-
- Apr, CTerm, IPmt, NPV, Pmt, PPmt, PV, Rate,
- Term
-
- ^Function IPmt (n1, n2, n3, n4, n5)
-
- Computes the amount of interest paid on a loan
- over a period of time.
-
- n1 is the principal amount of the loan.
- n2 is the annual interest rate.
- n3 is the monthly payment.
- n4 is the first month of the computation.
- n5 is the number of months to be computed.
-
- Example:
-
- IPmt(30000, .085, 295.50, 7, 3) returns 624.88.
-
- This is the amount of interest paid starting
- with month 7 for 3 months on a loan of
- $30,000.00 at an annual interest rate of 8.5%
- being repaid at $295.50 per month.
-
- Related Functions:
-
- Apr, CTerm, FV, NPV, Pmt, PPmt, PV, Rate, Term
-
- ^Function NPV (n1, n2, n3, n4,..., n99)
-
- Computes the net present value of an investment,
- based on a a list of cash flow values and a discount
- rate.
-
- n1 is the discount rate over one period.
-
- n2...n99 are the values which must be equally
- spaced in time and occur at the end of each period.
-
- NPV uses the order of n2, n3,... to interpret the order
- of the cash flows.
-
- Example:
-
- NPV(.15, 100000, 120000, 130000, 140000, 50000)
- returns 368075.16. If an investment is projected
- to generate $100,000, $120,000, $130,000,
- $140,000 and $50,000 over each of the next five
- years and the rate is 15% per annum, the NPV is
- $368,075.16.
-
- Related Functions:
-
- Apr, CTerm, FV, IPmt, Pmt, PPmt, PV, Rate, Term
-
- ^Function Pmt (n1, n2, n3)
-
- Computes a loan payment for a given principal,
- interest, and term.
-
- n1 is the principal amount of the loan.
- n2 is the interest rate per period.
- n3 is the number of periods.
-
- Example:
-
- Pmt(30000.00, .007083, 144) returns 333.02.
- This is the monthly payment for a loan of
- $30,000 repayable over 12 years (144 months)
- at a yearly interest rate of 8.5% (monthly rate
- of .085/12 = .007083).
-
- Related Functions:
-
- Apr, CTerm, FV, IPmt, NPV, PPmt, PV, Rate, Term
-
- ^Function PPmt (n1, n2, n3, n4, n5)
-
- Computes the amount of principal paid on a
- loan over a period of time.
-
- n1 is the principal amount of the loan.
- n2 is the annual interest rate.
- n3 is the monthly payment.
- n4 is the first month of the computation.
- n5 is the number of months to be computed.
-
- Example:
- PPmt(30000, .085, 295.50, 7, 3) returns 261.62.
- This is the amount of principal paid starting
- with month 7 for 3 months on a loan of $30,000
- at an annual interest rate of 8.5%, being repaid
- at $295.50 per month. The annual interest rate
- is used in the function because of the need to
- calculate a range within the entire year.
-
- Related Functions:
-
- Apr, CTerm, FV, IPmt, NPV, Pmt, PV, Rate, Term
-
- ^Function PV (n1, n2, n3)
-
- Computes the present value of an investment
- given an equal payment per period, a specific
- interest rate, and a number of periods.
-
- n1 is the amount of each equal payment.
- n2 is the interest rate per period.
- n3 is the number of periods.
-
- Example:
-
- PV(1000, .006666667, 60) returns 49318.43.
- This is the present value of $1000.00 invested
- at 8% percent (.08/12 per month) for 5 years
- (60 months).
-
- Related Functions:
-
- Apr, CTerm, FV, IPmt, NPV, Pmt, PPmt, Rate,
- Term
-
- ^Function Rate (n1, n2, n3)
-
- Computes the compound interest rate per period
- required for an investment to grow from present
- value to future value in a specified period.
-
- n1 is the future value.
- n2 is the present value.
- n3 is the term (number of periods).
-
- Example:
-
- Rate(110, 100, 1) returns .10.
-
- If $100 is invested for 1 term, the rate of interest
- must be 10% for that investment to grow to $110.
-
- Related Functions:
-
- Apr, CTerm, FV, IPmt, NPV, Pmt, PPmt, PV, Term
-
- ^Function Term (n1, n2, n3)
-
- Computes the number of periods needed to
- reach a given future value by making equal
- payments into an interest-bearing account
- at the end of each period.
-
- n1 is the payment amount made at the end
- of each period.
- n2 is the annual interest rate.
- n3 is the future value.
-
- Example:
-
- Term(475, .05, 1500) returns 3.1438
-
- If $475 is deposited at the end of each
- period into an account bearing 5% compound
- interest, it will take 3.1438 periods for it to
- grow to $1500.00.
-
- Related Functions:
-
- Apr, CTerm, FV, IPmt, NPV, Pmt, PPmt, PV, Rate
-
- ^category Logic Control
- ^Function Choose (n1, s1, s2,... s99)
-
- Uses n1 to select a value from the list of
- arguments s1...s99.
-
- n1 is a number which indicates the placement of
- a value in a list of arguments. If n1 is equal to 1,
- value s1 is returned. If n1 is equal to 2, value s2
- is returned, and so on. If n1 is less than 1 or is
- greater than the number of available arguments,
- zero is returned.
-
- s1, s2,...s99 is the list from which the value is
- selected. These can be numbers, alpha-numeric
- strings (enclosed in quotes), or fieldnames. These
- arguments are a list not a range.
-
- Examples:
-
- Choose(3,"Design","Filler","Merge","Server")
- will return Merge.
-
- Choose(JF01,"A","B","C") returns B if the
- value in JF01 is 2.
-
- Sum(Choose(JF01,JF12,JF13,JF14)) will compute
- a different sum based on the value of JF01. If JF01
- is 1, the sum of all occurrences of JF12 is returned.
- If JF01 is 2, the sum of all occurrences of JF13 is
- returned. If JF01 is 3, the sum of all occurrences
- of JF14 is returned.
-
- Related Functions:
-
- If, Return
-
- ^Function If (e1, s1, s2)
-
- Returns a value based on whether the specified
- expression is evaluated as true or false.
-
- e1 is the expression to evaluate.
-
- s1 is the action taken if the expression e1 is
- evaluated as true.
-
- s2 is the action taken if the expression e1 is
- evaluated as false.
-
- If the expression is true, a non-zero value is
- returned.If the expression is false, a zero value is
- returned.
-
- The If function can be used to vary the calculation
- depending on the value of other fields on the form.
-
- Examples:
-
- If(FIELDA>100,10,5)
-
- Calculate DISCOUNT as 10% if FIELDA is greater
- than 100, else set DISCOUNT to 5%.
-
- If(TOTAL>1000,"DIVISION MGR.","DEPT.MGR")
-
- If the value of the field TOTAL is greater than 1000,
- the string inserted into APPROVAL will be DIVISION
- MGR. If the value of the field TOTAL is less than
- 1000, APPROVAL is set to DEPT MGR.
-
- If(RESPONSE="Yes"| RESPONSE="Y", "GO TO
- SECTION A","GO TO SECTION B")
-
- If the RESPONSE field contains YES or Y then insert
- "GO TO SECTION A" into the current field, otherwise
- insert "GO TO SECTION B" into the current field.
- Note that in this example, the "|" character is an "or"
- statement. Other logical operators can be used to
- produce different results, for example "&" to represent
- "and"
-
- If(TOTAL ~> 1000,"Small Purchase Only","Requires
- Approval")
-
- If the value in the TOTAL field is not greater than
- 1000 then insert Small Purchase Only into the field,
- Otherwise, insert Requires Approval into the field.
-
- Related Functions:
-
- Choose, Oneof, Return, Within
-
- ^Function Return (v1)
-
- Returns the specified value (v1). The function is
- more useful as part of a constructed If.
-
- Related Functions:
-
- Choose, If
-
-
- ^category String Manipulation
- ^Function At (s1, s2)
-
- Locates the starting character position of
- string s2 within string s1.
-
- s1 is the source string.
-
- s2 is the string to search for.
-
- If string s2 is not in the source string, the function
- returns 0. If string s2 is located, the character
- position of the start of s2 within s1 is returned.
-
- Examples:
-
- At("ABCDE","DE") returns 4.
-
- At(FIELD01,"YZ") where FIELD01 contains the string
- "WXYZ" returns 3.
-
- At(STR(FIELDA), "999") returns 4, where FIELDA
- is a numeric field containing 123999456. The STR
- function converts the numeric value to a string.
-
- Related Functions:
-
- Concat, Left, Len, Lower, Ltrim, Oneof, Replace,
- Right, Rtrim, Space, Str, Stuff, Substr, Upper, Val,
- Within, WordNum
-
- ^Function Concat (s1, s2, [s3],[s4],..., [s99])
-
- Returns the string concatenation for all specified
- strings. At least two strings must be specified.
-
- s1 - the first string
- s2 - the second string to append to the first.
-
- Examples:
-
- Concat ("ABC","CDE") returns "ABCCDE"
-
- Concat ("XX",FIELDA,"-01") returns "XXABC-01", if
- the value of FIELDA is "ABC".
-
- Related Functions:
-
- At, Left, Len, Lower, Ltrim, Oneof, Replace,
- Right, Rtrim, Space, Str, Stuff, Substr, Upper, Val,
- Within, WordNum
-
- ^Function Left (s1, n1)
-
- Returns a specified number of characters from a
- string, starting from the first characters on the left.
-
- s1 is the string.
-
- n2 is the number of characters to extract.
-
- This string manipulation function is used to
- extract parts of another string.
-
- Examples:
-
- Left("ABCD",2) returns "AB"
- Left(XYZ-3031",3) returns "XYZ"
- Left(ZIP,5) returns the first five characters of
- the value of the field ZIP.
-
- Related Functions:
-
- Access, At, Concat, Len, Lower, Ltrim, Oneof,
- Replace, Right, Rtrim, Space, Str, Stuff, Substr,
- Upper, Val, Within, WordNum
-
- ^Function Len (s1)
-
- Returns the length (number of characters) in a
- specified string.
-
- s1 is the string to be evaluated.
-
- Examples:
-
- Len("ABC") returns 3
- Len("ABCDEFG") returns 7
- Len(ZIP) returns 10 if the current value of the ZIP
- field is 12345-6789.
-
- Related Functions:
-
- Access, At, Concat, Left, Lower, Ltrim, Oneof,
- Replace, Right, Rtrim, Space, Str, Stuff,
- Substr, Upper, Val, Within, WordNum
-
- ^Function Lower (s1)
-
- Returns a string where all uppercase characters
- are converted to lowercase.
-
- s1 is the string to be converted.
-
- Examples:
-
- Lower("ABC") returns "abc"
- Lower("Abc123X") returns "abc123x"
-
- Related Functions:
-
- Abs, At, Ceiling, Concat, Count, Floor, Left, Len,
- Ltrim, Max, Min, Mod, Oneof, Pi, Replace, Right
- Round, Rtrim, Space, Sqrt, Str, Stuff, Substr,
- Upper, Val Within, WordNum
-
- ^Function Ltrim (s1)
-
- Returns a string with all leading blanks removed.
-
- s1 is the string to be evaluated.
-
- Examples:
-
- Ltrim(" ABC") returns "ABC"
- Ltrim(" XY ABC") returns "XY ABC"
-
- Related Functions:
-
- Access, At, Concat, Left, Len, Lower, Oneof,
- Replace, Right, Rtrim, Space, Str, Stuff, Substr,
- Upper, Val, Within, WordNum
-
- ^Function Oneof (s1, s2, [s3],[s4],..., [s99])
-
- Is a logical function which returns true (1) or
- false (0). True (1) is returned if the first
- parameter is one of the values defined by the
- second and subsequent parameters.
-
- s1 is the value to match in the set defined by
- the other parameters.
-
- s2 is the first value in the set. At least one
- value must be specified.
-
- s3 to s99 are optional values in the set to be
- matched.
-
- Unlike most other functions, Oneof( ) operates
- differently on strings than it does on numerics. If s1 is
- numeric, all parameters s2...99 are converted to
- numeric values, and a numeric test is performed. If
- s1 is a string, all other parameters are converted to
- strings, and string comparisons are done. A field
- value is considered numeric if the Numeric attribute is
- set. Otherwise, the field value is considered a string.
-
- Examples:
-
- Oneof is a good function to use as a validation for
- user input. For example, you may have a field into
- which the user may enter F for female and M for
- male. Any other input is invalid. The most appropriate
- validation function would be Oneof, which returns
- true or false,
-
- The correct syntax of the field validation would be:
-
- Oneof($,"M","F")
-
- The $ tells JetForm Filler to match the entered
- value against the acceptable values of M or F.
- If the user enters any letter other than M or F,
- and error message appears.
-
- Oneof($,4,13,24) returns true (1) if the current
- field has a value of 4,13 or 24; otherwise it
- returns a false (0) result.
-
- Oneof(CLASS,"A","B","D") returns 1 if the value in
- the field CLASS is "A", "B" or "D"; otherwise it
- returns a 0 result.
-
- Related Functions:
-
- At, Concat, If, Left, Len, Lower, Ltrim, Replace,
- Right, Rtrim, Space, Str, Stuff, Substr, Upper, Val,
- Within, WordNum
-
- ^Function Replace (s1, s2, s3)
-
- Changes all occurrences of a specified string
- to a new string.
-
- s1 is the existing text string.
- s2 is the text to be replaced.
- s3 is the new text for replacement.
-
- Examples:
-
- Replace("this is the dog", "dog", "cat")
-
- This changes the original string to
- "this is the cat".
-
- Replace(JF01, "dog", "cow")
-
- If the contents of the field JF01 were
- "this is the dog", then this function would
- change the contents of the field to
- "this is the cow".
-
- Related Functions:
-
- At, Concat, Left, Len, Lower, Ltrim, Oneof,
- Right, Rtrim, Space, Str, Stuff, Substr, Upper, Val,
- Within, WordNum
-
- ^Function Right (s1, n1)
-
- Returns a specified number of characters from a
- string, beginning with the last character on the
- right.
-
- s1 is the string to be evaluated. If a field name is
- used as this parameter, do not enclose it in quotation
- marks.
-
- n2 is the number of characters to extract.
-
- Examples:
-
- Right("ABC",2) returns "BC"
- Right("XYZ-3031",4) returns "3031"
- Right(ZIP,4) returns the last four characters of
- the field ZIP.
-
- Related Functions:
-
- Access, At, Concat, Left, Len, Lower, Ltrim, Oneof,
- Replace, Rtrim, Space, Str, Stuff, Substr, Upper,
- Val, Within, WordNum
-
- ^Function Rtrim (s1)
-
- Returns a string with all trailing blanks removed.
-
- s1 is the string to be evaluated. If a field name is
- used as this parameter, do not enclose it in
- quotation marks.
-
- Examples:
-
- Rtrim("ABC ") returns "ABC"
- Rtrim("XYZ ABC ") returns "XYZ ABC"
-
- Related Functions:
-
- Access, At, Concat, Left, Len, Lower, Ltrim, Oneof,
- Replace, Right, Space, Str, Stuff, Substr, Upper,
- Val, Within, WordNum
-
- ^Function Space (n1)
-
- Generates a string with a specified number of
- blanks.
-
- n1 is the number to be generated.
-
- Example:
-
- Space(2) returns " ".
-
- Related Functions:
-
- Access, At, Concat, Left, Len, Lower, Ltrim,
- Right, Rtrim, Str, Stuff, Substr, Val,
-
-
- ^Function Str (n1, [n2], [n3])
-
- Converts a number to a character string.
-
- n1 is the number to be converted. This can also be
- the name of a numeric field. Do not enclose the
- field name in quotation marks.
-
- n2 is the length of the string. If not
- specified, the default value of 10 is used.
-
- n3 is the number of digits to appear after the
- decimal point. If not specified, 0 is used as
- the default.
-
- If the resulting string is too long, then
- asterisks are returned.
-
- Examples:
-
- Str(4.532,6,4) returns "4.5320"
- Str(2.456) returns " 2"
- Str(31.2345,4,2) returns "****"
-
- Related Functions:
-
- At, Concat, Left, Len, Lower, Ltrim, Oneof,
- Replace, Right, Rtrim, Space, Stuff, Substr, Upper,
- Val, Within, WordNum
-
- ^Function Stuff ("s1", "n1"," n2"," s2")
-
- Inserts a string into another string.
-
- s1 is the string to insert into.
-
- n1 is the character position in string s1, where
- 1 is for the first character.
-
- n2 is the number of characters to delete from
- string s1, starting at character n1.
-
- s2 is the string to insert into s1 starting at
- position n1.
-
- You can use field names of non-numeric fields
- for parameters s1 and s2. Do not enclose the
- field names in quotation marks.
-
- Examples:
-
- Stuff("ABCDE",3,2,"XYZ") returns "ABXYZE"
- Stuff("abcde",4,1,"wxyz") returns "abcwxyze"
- Stuff("ABCDE",2,0,"XYZ") returns "AXYZBCDE"
-
- Related Functions:
-
- Access, At, Concat, Left, Len, Lower, Ltrim, Oneof,
- Replace, Right, Rtrim, Space, Str, Substr, Upper,
- Val, Within, WordNum
-
- ^Function Substr (s1, n1, n2)
-
- Extracts a portion of a specified string.
-
- s1 is the string to be evaluated. This can also be the
- name of a non-numeric field. If you use a field name,
- do not enclose it in quotation marks.
-
- n1 is the character position in string s1.
-
- n2 is the number of characters to extract.
-
- Examples:
-
- Substr("ABCDEFG",3,4) returns "CDEF"
- Substr("abcdefghi",5,3) returns "efg"
-
- Related Functions:
-
- Access, At, Concat, Left, Len, Lower, Ltrim, Oneof,
- Replace, Right, Rtrim, Space, Str, Stuff, Upper,
- Val, Within, WordNum
-
- ^Function Upper (s1)
-
- Returns a string with all lowercase characters
- converted to uppercase.
-
- s1 is the string to be converted.
-
- Examples:
-
- Upper("abc") returns "ABC"
- Upper(AbcdE") returns "ABCDE"
-
- Related Functions:
-
- Abs, At, Concat, Count, Floor, Left, Len, Lower,
- Ltrim, Max, Min, Mod, Pi, Oneof, Replace, Right,
- Round, Rtrim, Space, Sqrt, Str, Stuff, Substr, Val,
- Within, WordNum
-
- ^Function Val (s1)
-
- Converts a string to a number.
-
- s1 is the string to be converted. This can also be the
- name of a non-numeric field. If you are using a field
- name, do not enclose it in quotation marks.
-
- Whenever a string is converted to a numeric value,
- various Picture editing characters are ignored.
- Leading $ and embedded commas are dropped. If
- the number is in parentheses, or contains a trailing
- "CR", a negative number is assumed.
-
- Normally Val( ) is automatically called to convert
- numeric values whenever needed. Val( ) need only
- be used for functions such as Oneof( ) and Within( )
- which are type sensitive.
-
- Examples:
-
- Val("123") returns 123
-
- If the string is not a valid number then a value
- of zero is returned.
-
- Related Functions:
-
- Access, At, Concat, Left, Len, Lower, Ltrim, Oneof,
- Replace, Right, Rtrim, Space, Str, Stuff, Substr,
- Upper, Within, WordNum
-
- ^Function Within (s1, s2, s3)
-
- A logical function which returns true (1) or false (0).
- True (1) is returned if the first parameter is within the
- range defined by the next two parameters. Otherwise
- it returns false (0).
-
- s1 is the value to test.
-
- s2 is the start of the range.
-
- s3 is the end of the range.
-
- This function can be used as a validation rule to test
- whether the entered value is within the specified
- range.
-
- Unlike most other functions, Within( ) operates
- differently on strings than it does on numerics. If s1 is
- numeric, parameters s2 and s3 are converted to
- numeric values and a numeric test is performed. If s1
- is a string, all other parameters are converted to
- strings and string comparisons are done. A field
- value is considered numeric if the Numeric attribute
- has been set. Otherwise, the field value is considered
- a string.
-
- Examples:
-
- Within("C","A","D") returns true (1)
- Within(1.5,0,2) returns true (1)
- Within(-1,0,2) returns false (0)
-
- Use Within in a validation to verify user input. For
- example, on a Employee Review form you want to
- ensure that the user enters an evaluation number
- between 1 and 10. The validation that you would use
- for this is Within ($,1,10)
-
- 1 is the lower limit and 10 is the upper limit. The $
- sign tells JetForm Filler to look in the current field for
- the value to check.
-
- Related Functions:
-
- At, Concat, Left, Len, Lower, Ltrim, Oneof,
- Replace, Right, Rtrim, Space, Str, Stuff, Substr,
- Upper, Val, WordNum
-
- ^Function WordNum (n1, n2)
-
- Converts a given number to an English text
- equivalent. The default uses option number 0.
-
- n1 is the number to be converted.
- n2 identifies the output format.
- 0 = formats as "One Hundred and Twenty-three"
- 1 = formats as "One Hundred and Twenty-three
- Dollars"
- 2 = formats as "One Hundred...Dollars and Forty
- Cents"
-
- Example:
-
- WordNum(73.54,2) will return:
- Seventy-three Dollars and Fifty-four Cents
-
- Related Functions:
-
- At, Concat, Left, Len, Lower, Ltrim, Oneof,
- Replace, Right, Rtrim, Space, Str, Stuff, Substr,
- Upper, Val, Within
-
-
- ^category Windows Extensions
- ^Function CallDll (ReturnType, DLL, Func, Type1,
- Value1, Type2, Value2)
-
- Calls a user created DLL that incorporates a
- customized calculation or validation function.
-
- ReturnType is the datatype of the returned data
- (includes the datatypes listed below, as well as
- datatype 0 for a void function).
-
- DLL is the name of the DLL to access.
-
- Func is the name of the function to be called within
- the DLL.
-
- Type1 is the datatype of the first parameter to the
- function.
-
- Value1 is the actual first parameter to the function.
-
- Type2 is the datatype of the second parameter to the
- function.
-
- Value2 is the actual second parameter to the
- function.
-
- A string up to 45 Type and Value statement pairs can
- be placed in the function.
-
- Datatypes include the following:
-
- 0 = void function
- 1 = Single character
- 2 = 16 bit Integer
- 3 = 32 bit Long
- 4 = Float - short floating point number
- 5 = Double - long floating point number
- 11 = Address of a character string
- 12 = Address of an Integer
- 13 = Address of a Long
- 14 = Address of a Float
- 15 = Address of a Double
-
-
- Example:
-
- In the following function:
-
- CallDll(5, "FINCALC.DLL", "CalcInterestAmount", 5,
- MORT_AMT, 5, INT_RATE, 2, MONTHS)
-
- where, MORT_AMT is a field containing the original
- amount of the mortgage, INT_RATE is a field
- containing annual interest rate of the mortgage, and
- MONTHS is a field containing the number of months
- of the amortization. The result is a floating point
- number equal to the amount of interest to be paid.
-
- In the following function:
-
- CallDll(0,"ADDRESS.DLL","AddDouble",15,field01,-
- 15, field02)
-
- AddDouble is a void function (datatype 0) which takes
- the addresses of two floating point numbers, adds the
- numbers, and puts the result into the second
- parameter (field02). The negative sign (-) on field02
- indicates that this field value is to be the result of a
- calculation.
-
-
- ^Function DDE ([s1], [s2], [s3])
-
- This function requests data from a specified
- application whenever a recalculation is done. A
- standard Dynamic Data Exchange (DDE) protocol is
- used, namely the DDE_REQUEST command.
-
- s1 identifies the application from which data is
- desired. ie. "EXCEL".
-
- s2 identifies the topic or file associated with
- the above application. ie. "SHEET1.XLS".
-
- s3 identifies the field, cell name, or range
- from which the data is taken, that is, "R2C3".
-
- All three parameters are required.
-
- DDE("Excel","Sheet1.xls","R2C3") retrieves the
- data in the cell "R2C3" of the Excel spreadsheet
- "Sheet1.xls". The data is requested only once.
-
- If the value changes in Excel then a recalculation
- must be done in order to update the value in Filler .
-
- NOTE: The "PasteLink" button is a fast way to
- define the function. In the target application,
- copy the contents of the desired field to the
- clipboard. In Filler, press the "PasteLink"
- button. The required format is generated,
- with the exception that the function is
- DDEAUTO(). Just rename it to DDE().
-
- Refer to JetForm Functions in the Online Help for
- more information.
-
- Related Functions:
-
- DDEAUTO
-
- ^Function DDEAUTO ([s1], [s2], [s3])
-
- This function creates a 'hot link' between the
- specified application and Filler. Whenever the value
- of the listed field/cell changes, the new value is
- automatically sent to Filler to update the field.
-
- These links will automatically be renewed every
- time Filler and the other application are run.
- A standard Dynamic Data Exchange (DDE) protocol
- is used, namely the DDE_ADVISE command.
-
- s1 identifies the application from which data is
- desired. ie. "EXCEL".
-
- s2 identifies the topic or file associated with
- the above application. ie. "SHEET1.XLS".
-
- s3 identifies the field, cell name, or range
- from which the 'hot link' is made, that is, "R2C3".
-
- All three parameters are required.
-
- DDEAUTO("Excel","Sheet1.xls","R2C3") retrieves
- the data from the cell "R2C3" of the Excel
- spreadsheet "Sheet1.xls" whenever it is modified.
-
- IF the value changes in Excel then the new value
- is passed to Filler to keep them equivalent.
-
- NOTE: The "PasteLink" button is a fast way to
- define the function. In the target application,
- copy the contents of the desired field to the
- clipboard. In Filler, press the "PasteLink"
- button. The required format is generated,
- with the exception that the function is
- DDEAUTO(). Just rename it to DDE().
-
- Refer to JetForm Functions in the Online Help
- for more information.
-
- Related Functions:
-
- DDE
-
- ^Function MessageBox (n1,s1,s2)
-
- Used to create a Windows message box on the
- screen.
- The form designer can use MessageBox to provide
- multiple messages. Message contents are
- determined
- by the logic in the validation rule.
-
- n1 identifies the message box command
- buttons:
- 0 = OK
- 1 = OK and Cancel
- 2 = Abort, Retry, and Cancel
- 3 = Yes, No, and Cancel
- 4 = Yes and No
- 5 = Retry and Cancel
-
- s1 identifies the message appearing in the
- message box, enclosed in quotation marks.
-
- s2 is the title for the messagebox, and is enclosed
- in quotation marks.
-
- The function returns a number based on the
- command button selected in the message box:
- 1 = OK
- 2 = Cancel
- 3 = Abort
- 4 = Retry
- 5 = Ignore
- 6 = Yes
- 7 = No
-
- Example:
-
- If(FIELDA>100,10,5)
- Calculate DISCOUNT as 10% if FIELDA>100,
- else set DISCOUNT to 5%.
-
- If(TOTAL>1000,"DIVISION MGR.","DEPT.MGR")
- Set the REQUIRED_APPROVAL depending on the
- value of the field TOTAL.
-
- If(MessageBox(4,Concat("The total exceeds
- $500.00. Obtain your Manager's
- signature"))=6)THEN SetVisible(1,"MAN_SIG");
- make the Signature visible
- SetVisible(1,"SIG_DATE"); make the Date visible
-
- ELSE
-
- Sum(EMP_TRAVEL,EMP_LIVING,EMP_PARKING)
-
- ENDIF
-
- This example shows the use of Message Box with
- Yes and No command buttons to display a message.
- If the test returns Yes (=6), the MAN_SIG and
- SIG_DATE fields becomes visible. If the test returns
- No, the expenses are totaled.
-
-
-