CONCAT

This command creates a text string by joining two or more text strings end to end.

Syntax

CONCAT expression, expression...

Expression can be any text string, number, or formula that returns a text string or a number.

Return value

This command returns a string.

Notes

When substituting a CONCAT formula for a parameter within another command such as IF or MESSAGE, best practice is to enclose the CONCAT formula within parentheses.  This clarifies which parameters should be joined by the CONCAT command and which ones should be used by other commands.

In GainSeeker versions previous to version 6, the CONCAT command was limited to two expression parameters. This meant that a formula such as

MESSAGE CONCAT " abc"," def","header string"

would display the "header string" in the message box heading.

To work properly in GainSeeker version 6 and later, this formula would need to be modified with explicit parentheses, such as

MESSAGE ( CONCAT " abc"," def"),"header string"

This issue may also impact MSG_POSITION, YN_POSITION, and YESNO formulas if they contained an embedded CONCAT command.

Examples

CONCAT "Hello ", NAME, "."

If you logged in to the SPC Data Entry module as "SPC Manager", then this formula would return the string "Hello SPC Manager."

CONCAT "Lot No. = ", TRIM [A3], "-", MYNVAR "counter"

If cell [A3] contains the value "CCV20080723" and the value of MYNVAR "counter" is the number 14, then this formula will return the string "Lot No. = CCV20080723-14".

MESSAGE (CONCAT "Lot No. = ", TRIM [A3], "-", MYNVAR "counter"), "Lot #"

If cell [A3] contains the value "CCV20080723" and the value of MYNVAR "counter" is the number 14, then this formula will display the message "Lot No. = CCV20080723-14".