COMPONENT PROCESSIG
--Traversing through 3 levels of Scroll ----
Level 1 - Req Line
Level 2 - Req Line Ship
Level 3 - Req Line Distrib.
&Req_Line = GetLevel0()(1).GetRowset(Scroll.REQ_LINE);
For &I = 1 To &Req_Line.ActiveRowCount
&REQ_LINE_SHIP = &Req_Line.GetRow(&I).GetRowset(Scroll.REQ_LINE_SHIP);
For &J = 1 To &REQ_LINE_SHIP.ActiveRowCount
&REQ_LN_DISTRIB = &REQ_LINE_SHIP.GetRow(&J).GetRowset(Scroll.REQ_LN_DISTRIB);
For &K = 1 To &REQ_LN_DISTRIB.ActiveRowCount
&REQ_LN_DISTRIB(&K).REQ_DISTRIB_WRK.PROJECT_ID.Visible = False;
End-For;
End-For;
End-For;
---- Code to Disable (Gray out) fields in scroll and Clear a drop down list(of say 5) and add only few list values (say 2).
&rs1 = GetLevel0().GetRow(1).GetRowset(Scroll.BOOK_CUR_VW);
For &I = 1 To &rs1.ActiveRowCount
&rs2 = &rs1.GetRow(&I).GetRowset(Scroll.RETIREMENT);
For &J = 1 To &rs2.activerowcount
&rs2_REC = &rs2.GetRow(&J).GetRecord(Record.RETIREMENT);
&rs3_REC = &rs2.GetRow(&J).GetRecord(Record.RETIRE_WRK);
/* Disable/Grayout the fields */
&rs2_REC.getfield(Field.TXN_REMOVAL_COST).Enabled = False;
&rs2_REC.getfield(Field.CONVENTION).Enabled = False;
&rs2_REC.getfield(Field.FULLY_DEPR_SW).Enabled = False;
/* Define field object to populate the drop down values */
&FLD_temp = &rs3_REC.TRANS_CODE;
/* Clear the current dropdown values */
&FLD_temp.ClearDropDownList();
/* Dynamically populate stanalone rowset with the values */
&RS_temp = CreateRowset(Record.TRANS_CODE_VW);
&RS_temp.Fill("WHERE TRANS_CODE IN ('ERROR','NORM')");
/* Add the values to the dropdown list*/
For &k = 1 To &RS_temp.ActiveRowCount
&FLD_temp.AddDropDownItem(&RS_temp.GetRow(&k).GetRecord(1).TRANS_CODE.Value, &RS_temp.GetRow(&k).GetRecord(1).DESCR.Value);
End-For;
End-For;
End-For;
No comments:
Post a Comment