Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 02 DEC 1997 12:14:12PM Jim Dierking wrote:

Can a subroutine be written that plugs into a

prompt at the validation pattern hook and rejects

a string entry if certain conditions are not

met. Specifically, I want the string "NET 30 Days"

to be rejected when the {COUNTRY} field ne "USA".

"NET 30 Days" is already being validated as

an acceptable entry by TABLE,TERMS at the validation

pattern prompt. Can both function together?

Any other great way to do this? TIA for the

help, Jim.


At 02 DEC 1997 12:57PM abjones wrote:

You can create a subroutine or symbolic dictionary

item to catch the phrase.

$INSERT SYSINCLUDE,WINDOW_COMMON%
HOLD_DICT_VAR=@DICT
HOLD_ANS=@ANS
HOLD_MV=@MV
@DICT=WC_DICT_FILE%

*@ID ASSIGEND BY WINDOW PROCESS

*@RECORD ASSIGNED BY WINDOW PROCESS

RETURN_STATUS=0 

*SEE PROMPT VALIDATION HELP

*(PAINT A WINDOW, SELECT A PROMPT, EDIT PROMPT WITH

* SELECT VALIDATION PATTERN COMPONENT, FOR HELP)

* STATUS 0) NO ERROR 1) ERROR WITH SYSTEM MESSAGE

* 2) ERROR WITH CONVERSION MESSAGE

* 3) ERROR BUT NO SYSTEM PROMPT

IF {TEST_ITEM_NAME}=TEST VALUE" THEN RETURN_STATUS=1
@DICT=HOLD_DICT
@MV=HOLD_MV
@ANS=HOLD_ANS
STATUS()=RETURN_STATUS

If this is a symbolic item of the window's table

and named "VALIDITY_TEST" then the validation pattern

can be logically "and" together using underscore

or plus as _{VALIDITY_TEST}


At 02 DEC 1997 01:06PM abjones wrote:

In my preceeding example use

@DICT=WC_SRC_DICT%

as shown by EDIT SYSINCLUDE WINDOW_COMMON%

to be the correct variable name for the file

variable for the table dictionary. I am too

sorry to keep 3 or 4 thoughts going at once,

getting old!


At 03 DEC 1997 11:50AM Jim Dierking wrote:

AB, I implimented the code as a subroutine and

plugged it in at the validation pattern hook

in the prompt edit in paint. eg TERMS_AUDIT

When "NET 30 DAYS" was entered it broke indicating

that too many parameters were passed. Here is

what I entered below. Thanks for your help with

this.

SUBROUTINE TERMS_AUDIT

$INSERT SYSINCLUDE,WINDOW_COMMON%

HOLD_DICT_VAR=@DICT

HOLD_ANS=@ANS

HOLD_MV=@MV

@DICT=WC_SRC_DICT%

RETURN_STATUS=0

IF @RECORD NE "USA" THEN ;*{COUNTRY}

IF @RECORD=NET 30 DAYS" THEN RETURN_STATUS=1   ;*{TERMS}

END ELSE

STATUS()=0

END

@DICT=HOLD_DICT_VAR ;*EXAMPLE SHOWED @DICT=HOLD_DICT ? _VAR OMITTED?

@MV=HOLD_MV

@ANS=HOLD_ANS

STATUS()=RETURN_STATUS


At 03 DEC 1997 06:52PM Andrew P McAuley wrote:

means treat as an oconv/iconv so it would be called as

subroutine MyConv(Type, Passed, Label, Returned)

For just simple subs use @S MYSUB@

amcauley@sprezzatura.com

Sprezzatura Ltd

World Leaders in all things RevSoft (Except VIP)


At 04 DEC 1997 03:19PM abjones wrote:

Your example looks ok, yes I forgot to reset @DICT

but you caught that.

In the Validation area of the Prompt Editor in Paint

use @S TERMS_AUDIT@ to signal subroutine

if TERMS_AUDIT was a dictionary item then {TERMS_AUDIT}

if Input Output conversion specially written

subroutine, then TERMS_AUDIT. I have best luck

with dictionary routines because they are kept with

the table to which they apply, but that is just the way

I assemble my disorganization.

Best of luck!


At 04 DEC 1997 06:54PM Jim Dierking wrote:

I implimented the subroutine TERMS_AUDIT at the

validation pattern hook as: @S TERMS_AUDIT@

When "NET 30 DAYS" is entered I do not get any

response. The entry is accepted. It doesn't

seem to be working. TIA for any other suggestions.

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/567913622c8ffceb85256561005eaf2f.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1