Ungray
Mon 01 January 2018Syntax
Ungray(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.
Description
Use the Ungray function to make a gray (non-editable) page field editable, if the field was grayed with a call to the Gray function.
Note: This function remains for backward compatibility only. Use the Enabled field property instead.
If the page field is made display-only in the Page Field Properties dialog, then Ungray has no effect.
The Gray, Ungray, Hide, and Unhide functions usually appear in RowInit programs that set up the initial display of data, and FieldChange programs that change field display based on changes the end user makes to a field.
Generally, you want to put this function on the same scroll level as the field that is being changed in RowInit (which executes on every row) or FieldChange (which executes on the current row). This simplifies the functionâs syntax to:
Ungray(fieldname)
A typical use of the more complex syntax is when looping through rows on a scroll on a lower level than the program.
Note: 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 |
The row number of the target row. If this parameter is omitted, the function assumes the row on which the PeopleCode program is executing. |
[ recordname . ] fieldname |
The name of the field to ungray. The field can be on scroll level one, two, or three of the active page. The recordname prefix is required if the call to Ungray is not on the record definition recordname . |
Returns
Optionally returns a Boolean value indicating whether the function executed successfully.