Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: After field/row/input logic being skipped by ON ACTION.  (Read 8418 times)
Ben R.
Posts: 28


« 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.
Tim S.
Posts: 26


« Reply #1 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
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines