Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
FUNCTION CHANGETRAY
LPARAMETER lcFRX, lnTray
LOCAL lcNewExpr, lnStartCopiesLine, lcStartAtCopiesLine, lnEndCopiesLine ;
lnLenCopiesLine, lcTop, lcBottom
#DEFINE vfCRLF CHR(13) + CHR(10)
IF !(UPPER(RIGHT(lcFRX, 4)) = ".FRX")
lcFRX = lcFRX + ".FRX"
ENDIF
USE (lcFRX)
LOCATE FOR objType = 1 AND objCode = 53
IF EMPTY(EXPR)
lcNewExpr = "DEFAULTSOURCE=" + ALLT(STR(lnTray)) + vfCRLF
ELSE
lnStartCopiesLine = ATC("DEFAULTSOURCE", EXPR)
lcStartAtCopiesLine = SUBSTR(EXPR, lnStartCopiesLine)
lnEndCopiesLine = ATC(vfCRLF, lcStartAtCopiesLine)
lnLenCopiesLine = LEN(SUBSTR(lcStartAtCopiesLine, 1, lnEndCopiesLine))
lcTop = SUBSTR(EXPR, 1, lnStartCopiesLine - 1)
lcBottom = SUBSTR(EXPR, (LEN(lcTop) + lnLenCopiesLine))
lcNewExpr = lcTop + "DEFAULTSOURCE=" + ALLT(STR(lnTray)) + lcBottom
ENDIF
REPLACE EXPR WITH lcNewExpr
USE IN (lcFRX)
ENDFUNC