In this example i need to disable the rows in the job component based on action reason field value for certain users.
The below code is written at the component level. If you have more than one level you can expand the below code to disable the fields for level 2 and level 3.
Local Rowset &MYROWSET;
If IsUserInRole("DEPT_TIMEKEEPER", "DEPT_PR_PRSR") Then
&MYROWSET = GetRowset();
For &A = 1 To &MYROWSET.ActiveRowCount;
&LEVEL1_ROW = &MYROWSET(&A);
&Action_Reason = &LEVEL1_ROW.GetRecord(Record.JOB).ACTION_REASON.VALUE;
If &Action_Reason = "WLT" Then
For &R = 1 To &LEVEL1_ROW.RECORDCOUNT
Tags: