Concatenation of Variables

Concatenation:

   You can combine ('concatenate') an unlimited number of preexisting variables to create a new variable. Type (in the left column of the IDB screen) the new variable. Note: the new variable must appear somewhere below the preexisting variables. (It can also be on a different page.) In the right column, type an equal sign and the variables that you want to combine. You can add punctuation as appropriate. See examples below. (The '=' sign indicates a 'calculation event'.

   So, if you have the variables [First Name] and [Last Name] in your Instant Database mask, but wish to use the variable [FullName] in the document, you do not need to type the First and Last Name values again. Just provide in the Instant Database mask the target variable '[FullName]' at the left and the equivalency formula at the right.

                                             

Variable

 

Value

[First Name]

 

John

[Last Name]

 

Doe

[FullName]

n

=[First Name] [Last Name]

A red square appears in the 'middle' column when the '=' is present.
Click the red square between the two columns and the equivalency is 'calculated'.
(The  space between the & and [Last Name] is needed to assure the proper formation of the new variable.)

 

Variable

 

Value

[First Name]

 

John

[Last Name]

 

Doe

[FullName]

n

John Doe

Click it again and the formula is restored for editing, if necessary.

In-line concatenation:

   The above can be also accomplished 'in-line' (i.e., within the document body. (This avoids the need for a mask.)

   Pathagoras will see the in line formula as a complete variable. It will automatically create the equivalency formula at the right with no action on your part. Click the red button that will appear between the two columns to toggle between the formula and the calculated value.

   Let's assume that [First Name] and [Last Name] (the 'precedent' variables) reside in the 'upper part' document. You now want to reference the concatenated value of those two variables somewhere below the first appearance of the precedent variables. Here is the formula that would reside in the actual document.

[#Concat#Full Name=[First Name] [Last Name]]

 

   When the document is scanned, the precedent variables are (presumably) found first and inserted into the IDB screen. When the #Concat# instruction is encountered, entire block is place into the variables list (left side) the variable. The formula is then automatically parsed from the #Concat# block and placed in the 'values' column of the IDB screen

Variable

 

Value

[First Name]

 


[Last Name]

 


[#Concat#FullName

n

=[First Name] [Last Name]

(Note: just like in the IDB screen, the example doesn't show the entire very long variable in the left column.
If you hover your mouse over the variable, it will display in its entirety.)

  A red square appears in the 'middle' column when the '=' is present.

Variable

 

Value

[First Name]

 

Eleanor

[Last Name]

 

Roosevelt

[#Concat#FullName

n

=[First Name] [Last Name]

Click the red square between the two columns and the equivalency is 'calculated'.

Variable

 

Value

[First Name]

 

Eleanor

[Last Name]

 

Roosevelt

[#Concat#FullName

n

Eleanor Roosevelt

Click it again and the formula is restored for editing, if necessary.

 

   Let's say you want to concatenate a term, but want it to occupy 2 (or more) lines (like an address. No problem. Simply place Pathagoras' plain text paragraph indicator '<P>' where you want the line break to be. Example:

Variable

 

Value

[First Name]

 

Eleanor

[Last Name]

 

Roosevelt

[FullName

n

=[First Name] [Last Name]

[Street Address]

 

123 Main Street

[City]

 

Phoenix

[ST]

 

AZ

[ZIP]

 

77654

[Full Address]

n

=[Street Address]<P>[City], [ST]  [ZIP]

When the red buttons are press, you should see this:

Variable

 

Value

[First Name]

 

Eleanor

[Last Name]

 

Roosevelt

[FullName]

n

Eleanor Roosevelt

[Street Address]

 

123 Main Street

[City]

 

Phoenix

[ST]

 

AZ

[ZIP]

 

77654

[Full Address]

n

123 Main Street<P>Phoenix,  AZ  77654

(Note-- the <P> stays in the value cell (because it cannot take up more than 1 row),
but when transferred into the document, it will 'stack' (i.e., <P> converted to 'Enter').

In-line concatenation:

   The [Full Address] variable can also accomplished 'in-line' (i.e., within the document body using this (example) text:

[#Concat#Full Address=[Street Address]<p>[City], [State]  [ZIP]]