Do you mean that you want the "tool tip" property to be bound to a character field? If so, you'd do this:
Code: Select all
item["tool tip"] = {
dataType: "char",
dataLength: "50",
designValue: "[TTLPGM]",
fieldName: "TTLPGM",
formatting: "Text",
trimLeading: "false",
trimTrailing: "true"
};
In this example, a character field, 50 chars long, will be created named TTLPGM that will be bound to the tool tip of the item. (I assume you know how to get the "item" var for the field you want to change, based on your message...) This bound field will be formatted as Text, and trailing blanks will be trimmed when the DDS variable is assigned to the tool tip.
The "designValue" property is what will display in the visual designer.
If by "reference" you mean that you're using a reference file (i.e. using the REF keyword, and want to pull the definition from the referenced file) then you do it very similarly, you just set the dataType to "reference", and do not specify the length.
Code: Select all
item["tool tip"] = {
dataType: "reference",
designValue: "[TTLPGM]",
fieldName: "TTLPGM",
formatting: "Text",
trimLeading: "false",
trimTrailing: "true"
};
Hope that helps