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

eval

eval(fileToExecute: String, fs: Dictionary<String>, readerInputs: Dictionary<ReaderInput> = {}, inputValues: Dictionary<Any> = {}, configuration: RuntimeExecutionConfiguration = {}): EvalResult

Evaluates a script with the specified context and returns the result of that evaluation.

Experimental: This function is an experimental feature that is subject to change or removal from future versions of DataWeave.

Parameters

Name Description

fileToExecute

Name of the file to execute.

fs

An object that contains the file to evaluate.

readerInputs

Reader inputs to bind.

inputValues

Additional literal values to bind

configuration

The runtime configuration.

Example

This example shows how eval behaves with different inputs.

Source

Output