Skip to main content

6-1 Basics of attribute-formula

This section describes the attribute-formulas used to dynamically change item attributes.

Attribute-formulas

Using an attribute-formula allows you to dynamically change the attributes of an item.

The term "Attribute" refers to item properties such as show/hide, coordinates, color, font size, line width, and so on.

  • For each item, you can perform the following operations:

    • Switching Between Show/Hide

    • Move and align the position.

    • Zoom in and zoom out.

    • Change the display colors.

    • Highlight text.

    • Copy the attributes of the same kind of items.

  • Similar to the conventional calculation-formulas and edit-formulas, you can also use "formulas" to do the following:

    • Reference data input (or calculation results if a calculation-formula is defined) in fields, barcodes, and GS1 Databars.

    • Reference global variables

    • Reference system variables

    • Reference item coordinates

    • Process the reference values using the functions for calculation-formulas and edit-formulas, and for attribute-formulas.

  • Differences from attribute change in SVF products version 8.2 or earlier are as follows:

    • You define a formula for the specific item for which attributes are to be changed.

    • You can also change two or more attributes at one time by defining a formula in function format.

    • You can easily identify what kind of change or reference is to be made by the function names.

  • Changes between SVF products version 9.0 and version 9.1 are as follows:

    • You can now define attribute-formulas in forms that include formcopy items.

    • You can now define attribute-formulas for the items included in a repeat.

    • You can now use attribute-formulas even if extended auto link mode is set.

    • You can now set attribute-formulas for the following items:

      • Record

      • Subform

      • Barcode

      • GS1 Databar

      • 2D barcode

      • Auto link field

    • You can now refer to the coordinates from the attribute-formula for the following items:

      • Formcopy

      • Text frames

    • The ROTATE function has been added to change the angle on horizontal axis and the rotation angle.

    • The following system variables have been added. (They can be used only in attribute-formulas.)

      • _FORMCOPY_NO

      • _REPEAT_NO

      • _RECORD_DATA_NO

      • _RECORD_OUTPUT_NO

    • You can now emphasize a specified range with the UNDERLINE function.

Restriction

You cannot specify an attribute-formula for a text frame, mask, repeat, or formcopy.

(However, it is possible to refer to the coordinates of formcopies and text frames via the attribute-formulas of other items.)

Reference rules for attribute-formulas

The following are rules when referring to other items within an attribute-formula:

  • You can refer to items located on the same level or on a higher level in the hierarchy.

    • Formcopies, subforms, records, and repeats are items that are considered to be the "borders" of a hierarchy.

    • A cross-reference is possible between a subform and the items directly under the subform.

    • A cross-reference is possible between records and the items under the records.

    swd92_4-1-1_001.png

    Referencing is only possible for items on the same level or on a higher level in the hierarchy

    Table 1. Reference rules for attribute-formulas

    No.

    Case

    Reference

    1

    The same level (including references from inside a repeat to outside the repeat)

    maru.png

    2

    Higher level

    maru.png

    3

    Higher level (outside of a subform)

    maru.png

    4

    • Between different records

    • Between different subforms

    batsu.png

    5

    Referring to items under a different subform level from items in the record

    batsu.png

    6

    Lower level (including references from inside a repeat to outside the repeat)

    batsu.png


  • When referring to a data value in a field, barcode or GS1 Databar, the value is retrieved after the calculation-formula set in each item is executed, and before the edit-formula is executed.

    Caution

    When executing using the Report-writer mode, which is a VrSetForm function mode (4 or 5), if you do not enter data in a numeric field or if you enter string data, the value (calculation result) of that field will be 0.

  • When an attribute-formula is specified also in the referenced item, if the referenced item is on the same level in the hierarchy, the attribute-formula in it is executed first and then the result is referred to. If the referenced item is on a higher level in the hierarchy, its content before the attribute-formula is executed is referred to.