Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #LRNG_FORM)
* Includes
Define_Com Class(#LREXTLB3) Name(#main)
Define_Com Class(#LREXTLB3) Name(#cell)

* Work Objects
Define_Com Class(#PRIM_ALPH) Name(#actionValue)
Define_Com Class(#PRIM_ALPH) Name(#actionparms)

Define_Com Class(#PRIM_NMBR) Name(#row)
Define_Com Class(#PRIM_NMBR) Name(#col)

Define_Com Class(#PRIM_ALPH) Name(#rowBackColor)
Define_Com Class(#PRIM_ALPH) Name(#rowBorderColor)


* GroupBy
Group_By Name(#cellData) Fields(#empno #surname #givename #deptment #section #address1 #address2 #address3 #phonehme #phonebus #salary)

* ===============================================================
*  LRELT001 - Mainline
* ===============================================================
Mthroutine Name(HandleRequest) Options(*REDEFINE)

* Set The Layout Folder
#main.layoutPath := '<Your Longrange Folder>/layouts/'
#cell.layoutPath := '<Your Longrange Folder>/layouts/'

* Load all the layouts
#main.loadLayout Layout('3columnmain.txt')
#cell.loadLayout Layout('3columncell.txt')

If (#COM_OWNER.RequestACTION.Contains( '_' ))
#actionValue := (#COM_OWNER.RequestACTION).Substring( 1 ((#COM_OWNER.RequestACTION).PositionOf( '_' ) - 1) )
#actionparms := (#COM_OWNER.RequestACTION).Substring( ((#COM_OWNER.RequestACTION).PositionOf( '_' ) + 1) )

Else
#actionValue := #COM_OWNER.RequestACTION
Endif

Case Of_Field(#actionValue)


When Value_Is(= actionCustomer)

#COM_OWNER.IsNewForm := false
#LRNGSERVICES.set Property('/Form.fields.header.fields.totalItems.text') To('Emplyee Selected : ' + #actionparms)

Otherwise /* Default */

#main.inflate

#row #col := 1
#rowBackColor := '&F0EFF4'

Select Fields(#cellData) From_File(pslmst)
#LISTCOUNT := #listcount + 1


If (#col = 4)

#row := #row + 1
#col := 1

Endif



#cell.inflate Parent('/Form.fields.content') Index(#LISTCOUNT) Parm01(#row.asstring) Parm02(#col.asstring) Parm03(#rowBackColor) Parm04(administrator_64.png) Parm05(#GIVENAME + ' ' + #surname) Parm06(#listcount.asstring + '-' + #empno) Parm07(#DEPTMENT) Parm08(#section) Parm09('actionCustomer_' + #listcount.asstring)

#col := #col + 1

Endselect

Endcase

Endroutine

End_Com
