Hear from Salesforce leaders on how to create and deploy Agentforce agents.
Contact Us 1-800-596-4880

concatWith

concatWith(source: Binary, with: Binary): Binary

Concatenates the content of two binaries.

Introduced in DataWeave version 2.5.0.

Parameters

Name Type Description

source

Binary

The source binary content.

with

Binary

The binary to append.

Example

This example concatenates two base-16 values into one binary value.

Source

%dw 2.0
import * from dw::core::Binaries
output application/dw
---
"CAFE" as Binary {base: "16"} concatWith "ABCD" as Binary {base: "16"}
DataWeave

Output

"yv6rzQ==" as Binary {base: "64"}
Json

concatWith(source: Binary, with: Null): Binary

Helper function that enables concatWith to work with a null value.

concatWith(source: Null, with: Binary): Binary

Helper function that enables concatWith to work with a null value.