Four Js Development Tools Forum

Discussions by product => Genero BDL => Topic started by: Ben R. on October 20, 2015, 06:06:31 pm



Title: After field/row/input logic being skipped by ON ACTION.
Post by: Ben R. on October 20, 2015, 06:06:31 pm
I have a dialog that looks like this:

Code:
dialog 
  display array p_venlog to s_venlog.*
  end display

  input array p_freight from s_freight.*
    after field ppd_cat
      display "after field"

    after row
      display "after row"

    after input
      display "after input"
  end input

  input array p_minord from s_minord.*
  end input

  on action accept
    display "accept"
    goto end_dialog

  after dialog
    label end_dialog:
end dialog

The after field, after row, and after input logic all triggers properly when I manually exit those fields, but when I hit accept all that logic is bypassed and only "accept' is displayed. I'm sure there's a way to have a dialog-level action exit the current display/input array without bypassing the related logic, but I haven't been able to find it.


Title: Re: After field/row/input logic being skipped by ON ACTION.
Post by: Tim S. on October 20, 2015, 07:02:04 pm
In your ON ACTION ACCEPT, try using ACCEPT DIALOG


ACCEPT DIALOG instruction

The ACCEPT DIALOG statement validates all input fields bound to the DIALOG instruction and leaves the block if no error is raised. Control blocks such as ON CHANGE, AFTER FIELD, AFTER ROW, AFTER INPUT/DISPLAY/CONSTRUCT will be executed according to the dialog structure. The statements appearing after the ACCEPT DIALOG will be skipped.

You typically code an ACCEPT DIALOG in an ON ACTION accept block:

01    ON ACTION accept
02       ACCEPT DIALOG