Has Value
Last updated
Last updated
The Has Value node checks if a value is defined and outputs a boolean result. It evaluates whether the input is null or undefined, returning true if the value is missing and false if it exists.
Value
The value to check for existence
Any
Yes
Result
True if the value is undefined or null, false otherwise
Boolean
Drag the Has Value node into your graph.
Connect any value to the "Value" input.
The node outputs true if the value is null or undefined.
Use the boolean output to control conditional logic in your graph.
This node is useful for handling optional inputs gracefully.
Combine with the If node to create fallback logic when values are missing.
Assert defined: For throwing an error when a value is undefined.
If: For creating conditional branches based on the result.
Parse Number: For checking if a value can be parsed as a number.
Default Value Selection: Check if a value exists before deciding to use a fallback.
Optional Parameter Handling: Gracefully work with inputs that might not be provided.
Data Validation: Verify the presence of data before processing it.