Three level Rowset Peoplecode
Here is a typical peoplecode example for reaching the level three reord using rowset peoplecode.
/* Need to insert a row when a flag = ‘Y’ after graying all other fields in the row in correction mode */
PeopleCode Event : COMPONENT_NAME(Component).GBL.PostBuild(Component PeopleCode)
Local Rowset &TQ_Lvl0, &TQ_Lvl1, &TQ_Lvl2, &TQ_Lvl3;
Local number &insert_row, &lvl_1_row, &lvl_2_row, &lvl_3_row;
&TQ_Lvl0 = GetLevel0();
&TQ_Lvl1 = &TQ_Lvl0(1).GetRowset(Scroll.LEVEL1_SCROLL_NAME);
&insert_flag = “N”;
For &lvl_1_row = 1 To &TQ_Lvl1.ActiveRowCount
&TQ_Lvl2 = &TQ_Lvl1(&lvl_1_row).GetRowset(Scroll.LEVEL2_SCROLL_NAME);
For &lvl_2_row = 1 To &TQ_Lvl2.ActiveRowCount
&TQ_Lvl3 = &TQ_Lvl2(&lvl_2_row).GetRowset(Scroll.LEVEL3_SCROLL_NAME);
For &lvl_3_row = 1 To &TQ_Lvl3.ActiveRowCount
&tq_adj_applied = &TQ_Lvl3(&lvl_3_row).LEVEL3_RECORD_NAME.FIELD_NAME.Value;
If &tq_adj_applied = “Y” Then
&TQ_Lvl3(&lvl_3_row).MPF_TINQ_LOG.EARNS_END_DT.Enabled = False;
&TQ_Lvl3(&lvl_3_row).MPF_TINQ_LOG.MPF_ADD_SUBTRACT.Enabled = False;
&TQ_Lvl3(&lvl_3_row).MPF_TINQ_LOG.MPF_HOURS_TYPE.Enabled = False;
&TQ_Lvl3(&lvl_3_row).MPF_TINQ_LOG.MPF_HOURS_ADJ.Enabled = False;
If %Mode = %Action_Correction Then
&TQ_Lvl3.InsertRow(&TQ_Lvl3.ActiveRowCount);
End-If;
End-If;
End-For
End-For;
End-For;
i need how to make simple operations in level1 using rowset concept
You mean your field is at level1 and you need to make simple operations for that field, then just do the first ‘for’ loop in the given example.
what is function name convert char to number thru pcode.
i m trying to Hide a column in level2,
the correct is Invisiable, but the LABLE for filed still visiable????
please HELP!!!!
Krishnaraj,
For your first question, use “value” function to convert a char to number.
Ex:
&stringnum = “1234.56″
&val = value(&stringnum)
Regarding your second question, use field class property label and method “enabled”.
Ex:
field.label.enabled
Bala.
i need to change a derived fld value for secondary page in level 2
i m not able to access this fld values.
i tried….
&fld = getlevel0()(1).reclevel1(1).reclevel2(1).derv.field.value;
above syntax is not working…..
please advice…!!!!
how to activate seconday page using peoplecode comand can u give some code
using domodal