This simple logic could be incorporated into WAM iiiSecMaint, however, you will instead create a new WAM to illustrate building a multi-WAM application.

Define a work field DEPT_IN based on DEPTMENT
Define a Group_by of all fields for the Section table. All fields should be input capable
Map field STDRENTRY for *both, as a *hidden field
Define a WebRoutine "AddSect"
Map field DEPT_IN for *bothYour code should now look like this:
Map group_by for Section fields for *both, all fields should be input capable. DEPTMENT should be a hidden field
End routine
Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_WAM) Layoutweblet('iiilay01')
Define #DEPT_IN Reffld(#DEPTMENT)
Group_By Name(#SECT_DETL) Fields((#DEPTMENT *hidden) #SECTION #SECDESC #SECADDR1 #SECADDR2 #SECADDR3 #SECPCODE #SECPHBUS)
*
Web_Map For(*BOTH) Fields((#STDRENTRY *HIDDEN))
*
WebRoutine Name(AddSect) Desc('Add Section')
Web_Map For(*BOTH) Fields(#Dept_In #SECT_DETL)
* ----------------------------
* Add section logic goes here
* ----------------------------
Endroutine
End_Com