HideScroll function
Syntax
HideScroll(scrollpath)
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 HideScroll function to programmatically hide a scroll bar and all data items within the scroll.
Note:
This function remains for backward compatibility only. Use the HideAllRows rowset class method instead.
Typically this function is used in RowInit and FieldChange PeopleCode to modify the page based on user action.
Parameters
| Parameter | Description |
|---|---|
|
scrollpath |
A construction that specifies a scroll level in the component buffer. |
Returns
HideScroll returns a Boolean value indicating whether the function executed successfully.
Example
This example, from RowInit PeopleCode, initializes the visibility of the scroll based on a field setting:
If %Component = COMPONENT.APPR_RULE Then
If APPR_AMT_SW = "N" Then
HideScroll(RECORD.APPR_RULE_LN, CurrentRowNumber(1), RECORD.APPR_RULE_DETL,⇒
CurrentRowNumber(2), RECORD.APPR_RULE_AMT);
Else
UnhideScroll(RECORD.APPR_RULE_LN, CurrentRowNumber(1), RECORD.APPR_RULE_⇒
DETL, CurrentRowNumber(2), RECORD.APPR_RULE_AMT);
End-If;
End-If;
The corresponding FieldChange PeopleCode dynamically changes the appearance of the page based on user changes to the APPR_AMT_SW field:
If APPR_AMT_SW = "N" Then
HideScroll(RECORD.APPR_RULEs_LN, CurrentRowNumber(1), RECORD.APPR_RULE_DETL,⇒
CurrentRowNumber(2), RECORD.APPR_RULE_AMT);
&AMT_ROWS = ActiveRowCount(RECORD.APPR_RULE_LN, CurrentRowNumber(1),⇒
RECORD.APPR_RULE_DETL, CurrentRowNumber(2), RECORD.APPR_RULE_AMT);
For &AMT_LOOP = &AMT_ROWS To 1 Step - 1
DeleteRow(RECORD.APPR_RULE_LN, CurrentRowNumber(1), RECORD.APPR_RULE_DETL,⇒
CurrentRowNumber(2), RECORD.APPR_RULE_AMT, &AMT_LOOP);
End-For;
Else
UnhideScroll(RECORD.APPR_RULE_LN, CurrentRowNumber(1), RECORD.APPR_RULE_DETL,⇒
CurrentRowNumber(2), RECORD.APPR_RULE_AMT);
End-If;