QuoteWerks Knowledgebase Topic (Article ID 6359)
Layout Designer - How do I use the Contains Operator
This information applies to :
March 4, 2016
How do I use the "Contains" operator in the QuoteWerks Layout designer?
(This will appear as a $ sign)
The '$' character or string character is the xBase Operand for "Contains."
You can use the $ operand or InStr() function to determine if a string is contained in another string. For instance, to determine if the word 'Labor' is in the decsription you can use either:
This will evaluate to Y or N (true/false):
This will valuate to the position that the string was found.
If the returned value is greater than 0, then the string was found:
The contains ("$") operator can be used in more advanced ways. Let's say an end user wants to print information on the layout in a Report Footer based on whether or not an Item Type is in the quote, or certain information is in the Purchasing Notes.
First you will need a counter to check for the variable in the Document Items:
...thus every time "Equipment" appears in the Item Type field, it will count. The "counter" should go in a Report Footer somewhere. Double-click the field once it is placed on the layout and make sure it's summarization type is set to "Total".
After that, you can then have a formula that combines the check for the Item Type in conjunction with the Purchasing Notes field. In this case, the forumla is checking to see if the text, "NoWago" is contained within the Purchasing Notes (note, the previous formula field was called "itemtypeadd")):
If the two parameters are met, then the field will print, "Hello world!" in the formula box on the layout.
©1993-2020 Aspire Technologies, Inc.
407-248-1481 (9am-5pm ET M-F)