Using Concatenation

The concatenate function lets you string together multiple data inputs. For example, you might want to generate account holder's first name and last name on a single line. You can use the concatenate function to string together, the fields to generate the required output. You can also use the concatenate function to generate barcode from the multiple input data fields.

Comms-transform tags are used to transform or support data manipulation and map the result as the value for <comms-data> tag that contains them. For barcodes, <comms-transform> is required when multiple data elements are needed to populate the data for the barcode.

Comms-transform concatenate

Comms-transform tag should be used as a child of <comms-data> and can contain one or more <comms-data> tags as children. Comms- transform creates new data by using the values from the <comms-data> children.

The <comms-transform> tag with type concatenation combines its <comms-data> children sequentially into a new string. Each child is treated as a string value. The comms-transform of type concatenation can include an optional separator attribute that is placed between each of the children's values when creating the final string output if provided.

Concatenate function supports static, dynamic, and combination of static and dynamic input data feed to generate the output.

Examples

Multi data feed with Separator
<comms-data>$Data{"Id":"Barcode39","BarcodeType":"Code39"}                      
        <comms-transform Type="Concatenation" Separator="-">                                             
        <comms-data>$Data{"Id":"AccountCode" }</comms-data>                                             
        <comms-data>$Data{"Id":"AccountNumber"}</comms-data>                                             
        <comms-data>$Data{"Id":" PaymentType"}</comms-data>                                             
        <comms-data>$Data{"Id":" PaymentAmount" }</comms-data>                      
        </comms-transform></comms-data>Sample Data:{    "AccountCode":
      "02",    "AccountNumber":
        "123456",    "PaymentType":
      "05",
       "PaymentAmount": 400}
       Output:Value of Barcode39 = 02-123456-05-400
Static data with Multi data feed
<comms-data>$Data{"Id":"Barcode39","BarcodeType":"Code39"}
         <comms-transform type="Concatenation">               
         <comms-data>$Data{"Id":" AccountCode","Value":"165789" }</comms-data>          
         <comms-data>$Data{"Id":"AccountNumber"}</comms-data>  
         <comms-data>$Data{"Id":"PaymentType"}</comms-data>          
         </comms-transform></comms-data>Sample Data:{    "AccountNumber":"53688",    "PaymentType":
      "05",}
        Output:Value of Barcode39 = 1657895368805