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

* Work Objects
Define_Com Class(#PRIM_ALPH) Name(#actionValue)
Define_Com Class(#PRIM_alph) Name(#dateDate)
Define_Com Class(#PRIM_ALPH) Name(#statusText)

* GroupBy
Group_By Name(#rowData) 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/'

* And Load

If (#COM_OWNER.DeviceType *EQ ANDROID)
If (#COM_OWNER.DeviceCategory *EQ SMALL)
#main.loadLayout( 'android-small.txt' )
Else
#main.loadLayout( 'android-large.txt' )
Endif
Endif

If (#COM_OWNER.DeviceType *EQ IPAD)
#main.loadLayout( 'ipad.txt' )
Endif

If (#COM_OWNER.DeviceType *EQ IPHONE)
#main.loadLayout( 'iphone.txt' )
Endif

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

Case Of_Field(#actionValue)

Otherwise /* Default */

#main.inflate

Endcase
Endroutine

End_Com
