Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 15 Next »

Overview

Field binding is used to create a field to allow a value or response to be tied to an RPG program field. With field binding, a new field is created with the name, data type, and length associated with the bound field when the rich display file is compiled. The newly created fields are then able to be used in your RPG program to have a value or response set from the program itself, or to receive a value or response from the application.

If a field is able to be bound the field binding dialog button will be available in the property:

Clicking this button will open the Field Binding Dialog:

Formatting the Bound Field

There are many different types of formatting that can be applied to a bound field. This allows the data loaded into the field to be displayed in a certain format.

Text - Format used for text. Options here can have the spaces trimmed from leading or trailing spaces. Also allows for text to be right justified and have zero or blanks fill the field.

Number - Used to format numbers. There are additional options to format the field.

  • Edit Word - Used to format a numeric field with an editing pattern you specify.

    

     In the example above the source data '000000123' would appear as '***123.00' in the output.
     

  • Edit Mask -
  • Currency Symbol - Used to place a character or string representing currency to precede the data. For example '$', '€', or 'Dollars: '.

    

  • Units - The units dropdown can preset the value of the field with a suffix from the following list:

    

Indicator -

Date - This is used to format the value of the field to display as a date.

Time - This format sets the value

Time Stamp - Formats the field with a date and time in the selected format.

Special - These are presets formats designed for different scenarios, such as zip code, social security number, or phone number formats.

Custom - The custom format can be used to specify your own formatting that may not be included in the preset format selections.

Custom JavaScript Function Example:

Custom Date/Time Pattern Example:

In the example you can see the pattern M - D - Y / g:i A would return the following format.

  • No labels