CASE of STDRENTRYYour completed RDMLX code should look like the following:
* when called from Begin WebRoutine
When = N
Change DEPTMENT to DEPT_IN (value passed in from iiiSecMaint)
Change SECTION to *null (value is passed in from iiiSecMaint)
* when Save button clicked
When = A
Change DEPTMENT to DEPT_IN (the input value on the web page)
Insert to Section file
If Status is *OKAY
Output message
Change STDRENTRY to L
Transfer to WebRoutine iiiSecMaint.Begin
Endif
Endcase
Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_WAM) Layoutweblet('iiilay01')
Group_By Name(#SECT_DETL) Fields((#DEPTMENT *hidden) #SECTION #SECDESC #SECADDR1 #SECADDR2 #SECADDR3 #SECPCODE #SECPHBUS)
Define Field(#dept_in) Reffld(#deptment)
Web_Map For(*BOTH) Fields((#STDRENTRY *HIDDEN))
WebRoutine Name(ADDSECT) Desc('ADD SECTION')
Web_Map For(*BOTH) Fields(#dept_in #SECT_DETL)
Case Of_Field(#STDRENTRY)
* New button clicked in iiiSecMaint
When (= N)
#deptment := #dept_in
#SECTION := *NULL
* Add button clicked
When (= A)
#deptment := #dept_in
Insert Fields(#SECT_DETL) To_File(SECTAB) Val_Error(*NEXT)
#STDRENTRY := *NULL
If_Status Is(*OKAY)
Message Msgtxt('Section successfully added')
#stdrentry := L
Transfer Toroutine(#iiiSecMaint.BEGIN)
Endif
Endcase
Endroutine
End_Com

Property | Value |
|---|---|
sourceWamName |
|
sourcewrName |
|
listName |
|
valueField |
|
Property | Value |
|---|---|
caption |
|
left_relative_image |
|
on_click_wrname |
|
submitExtraFields |
|
|
