User Level
Business Administrator
User LevelBusiness Administrator SyntaxAdd FormUse the Add Form command to define a form. Syntax
The Add Form clauses are:
Units ClauseThis clause specifies the units of page measurement. There are three possible values: picas, points, or inches.
Without a unit of measurement, the values of any given header, footer, margin, or field size are not interpreted. Because picas are the default unit of measurement, a picas value is automatically assumed if you do not use a Units clause. Picas are the most common units of page measurement in the computer industry. Picas use a fixed size for all characters. Determining the size of a field value is easy when using picas as the measurement unit. Simply determine the maximum number of characters that will be used to contain the largest field value. Use that value as your field size. For example, if the largest field value will be a six digit number, you need a field size of six picas. This is not true when using points. Points are standard units used in the graphics and printing industry. A point is equal to 1/72 of an inch or 72 points to the inch. Points are commonly associated with fonts whose print size and spacing varies from character to character. Unless you are accustomed to working with points, measuring with points can be confusing and complicated. For example, the character “I” might not occupy the same amount of space as the characters “E” or “O.” To determine the maximum field size, you need to know the maximum number of characters that will be used and the maximum amount of space required to express the largest character. Multiply these two numbers to determine your field size value. Inches are common English units of measurement. While you can use inches as your unit of measurement, be aware that field placement can be difficult to determine and specify. Each field is composed of character string values. How many inches does each character need or use? If the value is a four-digit number, how many inches wide must the field be to contain the value? How many of these fields can you fit across a form page? Considering the problems involved in answering these questions, you can see why picas are a favorite measuring unit. Rule ClauseRules are administrative objects that define specific privileges for various users. The Rule clause enables you to specify an access rule to be used for the form.
Color ClauseThis clause specifies color values used as the default foreground and background for the form.
For a list of available colors, see:
Header ClauseThis clause places a border at the top of the page. It specifies the number of lines, points, or inches that should be measured down from the top of the page. While inserting a Header clause defines an upper border, it does not prevent you from placing information within that border. Header clauses are often used with page titles. You might want to place title information within the header with the values below it. The following command creates a form named “Material Properties.” Measured in picas, the form is 80 characters wide and 60 lines long.
Margins ClauseThis clause specifies a left and right border on each page:
For example, assume you want to include margins in a “Material Properties” form definition:
In this example, the left margin is set as five characters in from the left page edge. The right margin is set as ten characters in from the right page edge. Since the page size is set as 80 characters, this means that the center working area is equal to 65 characters. When including a Margins clause in an Add Form command, you must always specify two values even if you only want one margin. This determines which value is the left margin offset and which is the right. For example, to define only a right margin, use can use this Margins clause:
The left margin is defined as the left page edge (0). The right margin is then defined as five characters in from the right page edge. This gives you a new working area of 75 characters in width.
With the inclusion of the Margins clause, you have a working area that is 30 characters wide. The left margin is at five characters from the left edge and the right margin is at five characters from the right edge. Since the right edge is at 40 characters, this definition is equivalent to saying that the right edge is at 35 characters. Type ClauseThis clause lists business types that the form is associated with. When a business object is highlighted and the Form option is selected, any forms associated with that type of business object are presented. Size ClauseThis clause defines the page dimensions of the form. This is commonly equal to standard page sizes such as 8½ by 11 inches or 8½ by 14 inches. However, you are not restricted to these sizes. A page is a logical unit that you define. Once defined, the definition determines where to place the header, footer, and margins. But, you must define the page size to determine when one page ends and another begins. To define a page size, you need two numeric values. One represents the width and one represents the height. Both of these values must be provided and entered according to the following syntax:
If you wanted the dimensions of a standard page, you would write one of the following clauses. The clause you use depends on the units you specified in the Units clause.
Field ClauseThe Field clause specifies the values to be printed and their general placement on the page:
Field Starting PointThe field’s starting point can be specified in one of two ways. The first is to give the absolute X and Y coordinates. The second is to give the X and Y coordinates relative to the form’s header and left margin. Absolute coordinates begin with 1,1 and are measured from the upper left corner of the page. They use the syntax:
For example, you could write the following field description to place a title at the top of the form:
This description will start printing the title string “Daily Customer Form For:” in the upper left corner of the page. Its coordinates, given in picas, indicate ten characters over and five lines down from the uppermost left corner of the page. Take care to ensure that field sizes do not conflict with other field locations. Relative coordinates can begin with 0,0 and are specified in the same general manner as absolute coordinates:
However, with relative coordinates, the values are measured from the upper left corner of the header and left margin intersection. For example, assume you have a form with a header of 6 and a left margin of 11. To place the same title in the same place as in the previous example, you would write the following field definition:
While the starting point is given as (0,0), this actually translates to an absolute starting point of (11,6). That is because the starting point for all relative coordinates is the bottom of the header (the 6th line) and the end of the left margin (11th character). When specifying the relative coordinates, you will always have to add the header and left margin values to obtain the absolute coordinates. Therefore a relative position of (28,0) translates into an absolute position of (39,6). When specifying the starting point, you can use any combination of relative or absolute values. Absolute coordinates are useful when you want to print a title within the heading, footer, or margin areas. You cannot do this using relative coordinates. Centering the title on the page is done by using the starting point in conjunction with the Size subclause. The Size subclause specifies the width and height of the field. First determine the number of characters required to print the title (36 characters) and then determine the amount of space remaining (80 - 36 = 44). That amount is divided in half to determine the starting row for the first field (@22). If you add the field size to this starting value, you find the starting location for the second field (@49). Like the Start clause of the Add Form command, the size is given width first and height second. For example, a value of “Address: ” is nine pica characters long and uses one line. Therefore, its size could be expressed as:
All geometry subclauses must include the field size. If the size value is larger than the field value, the field value is padded with blank spaces so that the field and size values are equivalent. If the size value is smaller than the field value, the field value is truncated on the right to fit into the field size. Multiple-line text output will wrap at word boundaries if the form field contains more than one output line. History Clause
The
Copy FormAfter a form is defined, you can clone the definition with the copy form command. SyntaxAfter a form is defined, you can clone the definition with the Copy Form command. This command lets you duplicate defining clauses with the option to change the value of clause arguments.
History ClauseThe
Modify FormAfter a form is defined, you can change the definition with the Modify Form command. This command lets you add or remove defining clauses and change the value of clause arguments.
Each modification clause is related to the arguments that define the form. To change the value of one of the defining clauses or add a new one, use the Modify clause that corresponds to the desired change. For example, use the Size clause of the Modify Form command to alter the values of the Size clause used in the Add Form command. The only exception to this general rule involves modifying field definitions. When modifying field definitions within an existing form, you have only two choices. You can either remove an existing field definition or you can add a new one. The Modify Form clause does not offer a way to alter the subclause values that make up a field definition. Therefore, if you are unhappy with a subclause value, you can only remove the entire field definition and replace it with one that has the desired changes in it. New field definitions appear at the end of the form definition. While they are listed last, their placement in the form definition does not affect the placement of the form values. That is controlled by the geography and size values within the field definitions themselves. Delete FormIf a form is no longer required, you can delete it using the Delete Form command.
Searches the list of defined forms. If the name is found, that form is deleted If the name is not found, you an error message is displayed. For example, to delete the form named “Income Tax Form,” enter the following:
After this command is processed, the form is deleted and you receive an MQL prompt for another command. Print FormUse the Print Form command to print information about the attributes of a specific form, including the number and characteristics of each form field.
Searches the list of defined forms. If the name is found, that form information is printed. If the name is not found, an error message is displayed. For example, to print details about the form named “TechTip,” enter the following:
The following is sample output: MQL<28>print form 'TechTip';
Form TechTip
inactive
field# 1 label Notes:
font Times New Roman-bold-12
autoheight false
autowidth false
drawborder false
hidden false
start 2 54
size 13 2
user all
field# 2 select attribute[Notes]
color black on lemon chiffon
font Times New Roman-10
autoheight false
autowidth false
drawborder true
multiline true
edit true
hidden false
start 23 54
size 75 5
user all
field# 3 label Reason:
font Times New Roman-bold-12
autoheight false
autowidth false
drawborder false
hidden false
start 2 44
size 20 2
user all
field# 4 select "attribute[Reason]"
color on lemon chiffon
font Times New Roman-10
autoheight false
autowidth false
drawborder true
multiline true
edit true
hidden false
start 22 44
size 75 8
user all
field# 5 select description
color on lemon chiffon
font Terminal-10
autoheight false
autowidth false
drawborder true
multiline true
edit true
hidden false
start 22 23
size 75 19
user all
nothidden
created Fri Jun 22, 2001 8:16:45 PM EDT
modified Fri Jun 22, 2001 8:16:45 PM EDT nothidden
created Wed Oct 31, 2001 2:57:09 PM EST
modified Wed Feb 20, 2002 2:47:56 PM EST
Since forms have additional uses in support of dynamic UI modeling, the MQL print command suppresses the output of data that is not used. For example, if you print a form that is defined as a system object used for Web applications, the following selects will not be printed: size, minsize, scale, font, minwidth, minheight, absolutex, absolutey, xlocation, ylocation, width, and height. Conversely, when printing non-Web forms, parameters used only for Web forms are suppressed from the output: href, alt, range, update, and settings |