407-248-1481

QuoteWerks Knowledgebase Topic (Article ID 5443)

Print Layouts - AddLine() function

This information applies to :

Article ID
5443

Created/Updated
April 6, 2004

Category
Print Layouts


Are you using the most current release of QuoteWerks?
Version 5.5 Build 1
Question:
How do I add formulas to my layout?

Solution:
You can create customized formula fields. Creating formula fields is an advanced topic. We will only cover a basic example here. Often, addresses are only 2 lines in length, but since QuoteWerks provides 3 address lines, sometimes you will end up with a blank line (where the suite # should be) between the first and third line of the address. We can use a formula field to eliminate that blank line using the following steps:

1. Select the InsertFormula field menu, and enter a name for the formula field. The name can be any name that you would like. Typically, you will name the formula field to convey the purpose of the formula field. We will call ours FullAddress. After you have named the formula field, a formula builder window will appear.
2. Click on the [Function] button, and choose the AddLine(string) function. This will display the text "ADDLINE(" in the formula builder.
3. Then, click on the [Data Field] button and then choose the SoldToAddress1 field from the DocumentHeaders table. This will display the text "ADDLINE(DocumentHeaders->SoldToAddress1" in your formula builder window.
4. Next, type a parenthesis symbol ")". This will display the text "ADDLINE(DocumentHeaders->SoldToAddress1)" in your formula builder window.
5. Then click on the [Operator] button, and choose the plus "+" symbol. This will display the text "ADDLINE(DocumentHeaders->SoldToAddress1)+" in your formula builder window.
6. Repeat this process starting at step 2 for SoldToAddress2 and SoldToAddress3. After SoldToAddress3, do not add a plus "+" symbol. When completed, the formula builder window will display the formula "(DocumentHeaders->SoldToAddress1)+ ADDLINE(DocumentHeaders->SoldToAddress2)+ ADDLINE(DocumentHeaders->SoldToAddress3)". Click on the [Ok] button, and then place the formula on the print layout. Now, when you print the print layout you will notice that even if there is no Address 2 line, a blank line will not be printed.
7. After placing the formula field on the print layout, right click over the formula field, select Format, and then check the mult-line checkbox, and click on OK.

New Search