This pre-process script changes data in the record before a field is entered, and the changed value is redisplayed in the view. The example doubles the open A/R balance of a UT sample customer.
! This example shows how you can update data in a Pre Process of a Field! and have that data redisplayed in a View.! This example uses the UT library, which comes with IDOL-IV.
! 8INPUT PRE/POST SCRIPT - Pre/Post processing for 8INPUT API. See 8INPUT! API documentation for more details in the! Dictionary-IV Reference Manual.!! This script serves as a before or after input procedure used for! IDOL-IV file maintenance (pre- or post-processing) and 8INPUT API.! It is not designed to be executed from another script.!! The following is a list of the Call/Enter variables that are compiled! into this type script:!! VAV3$ - String passed into public from format (same as S8$).! SPARM$[ALL] - Screen array (see on-line help for 8INPUT).! FPARM$[ALL] - Format array (see on-line help for 8INPUT).! FD$ - Entire data record (before field edit).! ]7$ - System variable (DO NOT ALTER).! W1$ - Field entry (contains data entered).! SE - Field control value.! W$ - Internal use (DO NOT ALTER).!
MAINLINE FORMAT INCLUDE #UTCUST,OPT="NONE" LET #UTCUST = FD$ LET #UTCUST.OPEN-AR-BALANCE = UTCUST.OPEN-AR-BALANCE * 2 LET FD$ = #UTCUSTENDSCRIPT
!NOTE: This example will only work as a Pre Process type P script.! The Only other way to do this is with OPENWorkshop in a! CONNECT METHOD with the "PRINT ROW" method directive.Notes
- This only works as a pre-process script of type P.
- The only other way to do this is with OPENworkshop, in a CONNECT METHOD that returns the PRINT ROW method directive.
- The example uses the UT sample library that comes with IDOL-IV. See the 8INPUT API in the Dictionary-IV documentation for the variables passed to the script.