Monday 31 October 2016

Access level 1 field from level 0

/*Declaring Variables*/
Local Rowset &rowset;
Local Record &rec;
Local Field &field;

&rowset0=getlevel0();  /*Get level 0 rowset*/
&row=&rowset0.getrow(1)/*Get row 0 of level 0 rowset*/
&rowset1=&row0.getrowset(scroll.RECORD_NAME1);  /*Get rowset from row 0 using the scroll name(can also be the name of the primary record in the scroll)*/
&row1=&rowset1.getrow(1);  /*get row1 of level 1 rowset*/
&rec1=&row1.getrecord(record.RECORD_NAME2);  /*get record in the row1*/
&field1=&rec1.FIELD_NAME;  /*finallay access the field in the record*/ 


OR------

&rowset1 = getlevel0(1).getrowset(scroll.RECORD_NAME1);
&field = &rowset.getrecord(record.RECORD_NAME).FIELD_NAME;


HAPPY LEARNING :) 

3 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Hi, thanks for the info.

    I think there are two lines wrong:

    &rowset = getlevel0()(1).getrowset(scroll.RECORD_NAME1);
    &field = &rowset.GetRow(1).getrecord(record.RECORD_NAME).FIELD_NAME;

    Cheers!

    ReplyDelete
  3. Hello All,

    I want to Access field from LEVEL 1.

    like the field is in the grid and accepting the marks for a subject. i want to generate the grade automatically after entering the marks. >85 the grade A+ , 70-85 Grade A.

    how can i do it?

    thank you.

    ReplyDelete

FieldEdit vs FieldChange Event in PeopleSoft

FieldEdit event is more of a validation event used to validate the value entered in a field and throw error/warning if the value is not wh...