Use this procedure/function to justify (left, right, or center) a variable field content by modifying its field coordinates.
Note | To pad a text string so it will appear centered within a given string length, use the JCenter function. The JustField function is for justifying display items, such as fields, on a fixed point. |
JustField (Mode, Xcoordinate, Justification, Field, Section, Form, Group)
Parameters |
Description |
Mode |
Enter L (left), R (right), or C (center). The default is L. |
Xcoordinate |
Enter the X coordinate used to align the field. If Mode is R, this will be zero (0), the right-most position of the field. If Mode is C, this will be the center of the field. Here is an example: "R", 5000 If the data is 12345, the character 5 will be positioned at 5000 FAP units. |
Justification |
Enter a character found in the data to use to align the field. The procedure aligns the field so the character you specify overlays the X coordinate. You must define the X-coordinate parameter when using the justification character. If you omit the X-coordinate the system runs as if the justification character was not specified. Here is an example: R,5000,"." If the data is 123.45, then the decimal point will be positioned at 5000 FAP units. |
Field |
Enter the name of the field. The default is the current field. |
Section |
Enter the name of the section that contains the field. The default is the current section. |
Form |
Enter the name of the form that contains the section and/or field. The default is the current form. |
Group |
Enter the name of the group that contains the form, section, and/or field. The default is the current group. |
This example centers the original address lines data in the section, QJUSTFIELD2, at 10,000 FAP units.
JustField("C",10000, ,"line 1", , "qjustfield2")
JustField("C",10000, ,"line 2", , "qjustfield2")
JustField("C",10000, ,"line 3", , "qjustfield2")
Here is an example:
This example justifies the original line data (left aligned at 5,000 FAP units) on the decimal point at 10,000 FAP units.
JustField("C",10000,".","line 1")
JustField("C",10000,".","line 2")
Here is an example:
© Copyright 2014, Oracle and/or its affiliates. All rights reserved. Legal notices.