IPeople Blog

Using the PRE Field Attribute on NPR Report Writer Screens

Written by Gary | Apr 11, 2022 5:00:00 AM

The PRE Field Checks occur before the FCL Field Checks.  They are executed after the end-user enters a non-printable character.  Unlike FCLs, they execute regardless of whether or not the end-user entered in a new non-nil value.

Here is an example (MAGIC) that converts whatever the end-user enters from lowercase to uppercase:   PRE1=A~$L.TO.U^A

Here is the same example but for C/S:   PRE1=A@Trl2u^A

Here is an example for MAGIC that automatically exits a screen if the end-user does not enter any value into a field:

PRE1=IF{@Not(A) 231^/Z^t}

Here is that sample example for C/S:   PRE1=IF{@Not(A) 27^/Z,1^/(.S).SKIP.EXIT}

This example will work for both MAGIC and C/S.  It pops up the exit prompt if no value is entered:   PRE1=IF{@Not(A) 27^/Z}