Gray
Mon 01 January 2018Syntax
Gray(scrollpath, target_row, [recordname.]fieldname)
where scrollpath is:
[RECORD.level1_recname, level1_row, [RECORD.level2_recname, level2_row, ]] RECORD.target_recname
To prevent ambiguous references, you can also use SCROLL. scrollname , where scrollname is the same as the scroll levelâs primary record name.
If you put the function on the same scroll level as the field being changed, you can use the following syntax:
Gray(Fieldname)
The more complex syntax can be used to loop through a scroll on a lower level than the PeopleCode program.
Description
Use the Gray function to make a field unavailable for entry a page field, preventing the user from making changes to the field.
Note: This function remains for backward compatibility only. Use the Enabled field class property instead.
Gray makes a field display-only, while Hide makes it invisible. You can undo these effects using the built-in functions Ungray and Unhide.
Note: If you specify a field as Display Only in Application Designer, using the PeopleCode functions Gray, followed by Ungray, will not make it editable. This function shouldn't be used in any event prior to RowInit.
Parameters
Field or Control |
Definition |
---|---|
scrollpath |
A construction that specifies a scroll level in the component buffer. |
target_row |
An integer specifying the row on the target scroll level where the referenced buffer field is located. |
[ recordname . ] fieldname |
The name of the field to gray. The field can be on scroll level one, two, or three of the active page. The recordname prefix is required if the call to Gray is not on the record definition recordname . |
Returns
Optionally returns a Boolean value indicating whether the function succeeded.