HomeTechnical Support » Modifying Forms

Modifying Forms

Assigning a value to a variable name Messages in this topic - RSS

Nancy
Administrator
Posts: 765


7/17/2014
Nancy
Administrator
Posts: 765
Communicating information to PrintBoss can be done in many different ways. One way is by making specific assignments of data. There are several different assign commands:

_ #Assign
_ #AssignLines
_ #AssignmentsBlock
_ #Assigns

Use the #Assign command to assign a value to a variable name. The following is an explanation of the #Assign and #Assigns commands. The other assign commands can be found in Appendix B of the PrintBoss Manual.

#Assign

#Assign 'VarName', 'Value' [, CaptXRange, CaptYRange [, Options]]

#Assign uses two methods to assign a value. The first method is to enter a static value in the Variable Value parameter field. The command can be placed in any Object tab when using this method. If an assignment occurs more than once, the last assignment created is always the current one. Assignments are processed in the order they appear in the Objects tab.

The second method is to specify coordinates to capture value(s) from the data supplied by the accounting software. The #Assign command MUST be in the RunTime section when using this method. The assigned variable can only be referenced in Footer or Page Back Objects since the value is not supplied until the accounting software data is evaluated between the RunTime and Footer sections. Select the Pre-process Assignments box on the Special Controls tab when an assignment needs to be referenced in the RunTime Objects tab. This method is useful for repositioning or reformatting captured data passed by the accounting software. It can also be used to assign the DocNo, DocAmnt, DocRecip, DocDate, and DocMisc as well as adding conditional elements. One of the options for this command blanks out the original location of the data after it is captured.

All captured variables can be used in #Text commands, as components of conditional statements, and as components of loops and counters. In addition, they can be used in positive pay scripts, e-mails, fax messages, and as parts of dynamic file names for PDF and Positive Pay files. The dynamic file name feature is only available in the Enterprise edition of PrintBoss.

The following is a description of the parameters for the #Assign command.

VARNAME
The Variable Name can be a variable expected by PrintBoss, such as DocNo, or any arbitrary name.

VALUE
Only enter a static Variable Value when the CaptXRange and CaptYRange (Capture Coordinates) are not passed to PrintBoss. If CaptXRange and CaptYRange are passed, this parameter is usually left blank. When both the Variable Value and Capture Coordinates exist, PrintBoss will only use the Variable Value when no value is returned for the Capture Coordinates.

For example:
#Assign "EmailTo", “Support@WellspringSoftware.com” – where EmailTo is the VarName and the email address is the Value. No coordinates are assigned.

#Assigns

#Assigns 'VarName', 'Value' [, CaptXRange, CaptYRange [, Options]]
The parameters for #Assigns are identical to the #Assign command (without the ending “s”) and is used to assign a multi-line variable. There are 2 methods to assign a value, though they differ from the #Assign command.

The first method is to simply provide the value by entering the Value parameter. Each time an additional #Assigns command occurs with the same VarName, an additional line is added to the multi-line variable. For example:
#Assigns EmailMsg, "Thank you for your order from Wellspring Software, Inc."
#Assigns EmailMsg, "The invoice for your order is attached to this e-mail for your convenience."
#Assigns EmailMsg, "The original paper invoice is being mailed."
#Assigns EmailMsg, " "
#Assigns EmailMsg, "Please call us with any questions"

The second method to assign a value is to supply coordinates to capture data. Of course it is expected that the vertical range includes a region large enough to capture more than one line. If the option Add together fields in horizontal range is checked, each ROW of text objects will be added together and treated as a single element in the multi-line variable.

For example, to capture a variable for the payee lines in a check that occur between 8 and 9.5
inches down the page, the following command might be used:

#Assigns PayeeAds, "", 1.183/.0100, 8000-9.500, LRB1WS |This command captures several lines of text at once. These lines can be printed as a group using the VText command.

The first value range defines the CaptXRange and the second defines the CaptYRange. The letters and numbers represent various options for the captured text. For example, B indicates the raw data is blanked out after capture.
edited by Nancy on 7/17/2014
0 link






Powered by Jitbit Forum 8.3.8.0 © 2006-2013 Jitbit Software