Skip to content

Set Value — Reference

Reference · Advanced · Server Connect

Evaluate a value and make it available to later server steps.

Evaluate a value and make it available to later server steps.

  • An open Server Connect action. Runtime differences below refer to the installed Node.js and PHP implementations.

Evaluate a value and make it available to later server steps.

Setting Meaning
NameStores the returned value under this step name in the current action scope. For example, greeting becomes available as greeting to later expressions.
Global NameAlso writes the value to a named key in the action’s global scope. For example, counter lets a loop update a shared counter. This is request/action scope, not persistent storage shared by all users.
ValueThe literal or server expression to evaluate. For example, a literal Hello from Server Connect returns that string; a numeric expression returns its evaluated result.
Data TypeDescribes the result to the editor’s data picker. Choosing Number does not cast a string to a number at runtime. The runtime returns the evaluated Value; use an expression with the intended type.
Define SchemaDescribes fields of an Array or Object for the picker. It does not validate, create or reshape those fields at runtime.
OutputIncludes the named result in the response data. Default off. The result remains available to later server steps without Output.

Add Set Value with Name greeting, Value Hello from Server Connect and Output on. Running the action should return {“greeting”:“Hello from Server Connect”}. Change the literal and rerun to confirm that this step supplies the response.

Check the actual response type as well as its value. Selecting Number in Data Type while returning the string “12” does not guarantee a numeric 12. Global Name is not a database write or a session value.

Use the Server Connect guides when you need the surrounding project, data-loading or form procedure.

You can configure Set Value deliberately and verify the result and failure behavior described in this reference.