Page 1 of 1

Writing Information to a form

Posted: Tue May 14, 2019 5:41 pm
by JeffGrant
Hi, with this code which sits behind a field in a printable account statement, what function can i use to take the echo comments and write them to the printable statement. Thanks


DECLARE STRET Type Character
DECLARE AUXKEY1 TYPE CHARACTER
OpenTable("c:\capital\firstcal\CUAUX000")
AUXKEY1:=CUSTREC->CUSCODE
CUAUX000->(FIND(AUXKEY1,,TRUE))
STRET:= GETFIELD("APPRET","CUAUX000")
CLOSETABLE()
If Stret = "Yes" .OR. Stret = "yes"
echo("Credit App Returned")
elseif Stret = "No" .OR. Stret = "no"
echo("No Credit App returned")
else
echo("Garbage in the field")
endif

Re: Writing Information to a form

Posted: Tue Jun 11, 2019 11:53 am
by COBS Tech Support
If the script is embedded behind a field object on a form template, then all you need to do is use the Return command. I.e.,

Code: Select all

If X
   Return "Print this text on the page"
Else
  Return "Otherwise print this text"
Endif