Help W/moving a list between server module, command handler, and view
Posted: Sat Feb 06, 2021 4:34 am
EDIT: The problem lies with the fact that my Next_button is on the command handler. When I move next_button to the View, it works fine. However, it creates design issues (among others) if next_button's parent is not the command handler. So the basics of what I'm looking for help with is moving lists back and forth between the View and the command handler.
In the below image, I have 4 fields that have an N in them. When I click next button, I should get a #sys_web.alert that says at least 1 of them needs to be a Y. However, the list isn't read by the by the server module routine flagcheck. I even tried doing it by individual fields, but still doesn't work. Relevant code after image. I'm sure it's something simple/easy that I'm missing, so thank you.

Next button click:
View code:
Server module routine:
In the below image, I have 4 fields that have an N in them. When I click next button, I should get a #sys_web.alert that says at least 1 of them needs to be a Y. However, the list isn't read by the by the server module routine flagcheck. I even tried doing it by individual fields, but still doesn't work. Relevant code after image. I'm sure it's something simple/easy that I'm missing, so thank you.

Next button click:
Code: Select all
Evtroutine Handling(#Next_Button.Click)
Inz_List Named(#flags)
#CUDTC01.flagcheck
If Cond('(#CSSTYN *EQ N) *AND (#CSBTYN *EQ N) *AND (#CSPPYN *EQ N) *AND (#CSFBYN *EQ N)')
#sys_web.Alert Caption('Ship to or Bill to has to be a Y')Code: Select all
Mthroutine Name(flagcheck)
Define_Com Class(#ESF_MNT_CUHD_CMDHANDLER_svrm.FlagCheck) Name(#flagcheck)
Inz_List Named(#flags)
#flagcheck.Execute Flags(#flags) Flag1(#CSBTyn) Flag2(#CSFBYN) Flag3(#CSPPYN) Flag4(#CSSTYN)Code: Select all
Srvroutine Name(FlagCheck) Session(*REQUIRED)
Field_Map For(*INPUT) Field(#csstyn) Parameter_Name(flag1)
Field_Map For(*INPUT) Field(#csbtyn) Parameter_Name(flag2)
Field_Map For(*INPUT) Field(#csppyn) Parameter_Name(flag3)
Field_Map For(*INPUT) Field(#csfbyn) Parameter_Name(flag4)
List_Map For(*INPUT) List(#flags)
Get_Entry Number(1) From_List(#flags)