Memory String:
The MemoryNode is designed to store a value in memory, exhibiting a flip-flop behavior. This means it can hold onto a value and update it based on certain conditions, specifically when a flag is set. This node is particularly useful in scenarios where you need to retain a piece of information across different stages of a workflow or when you want to toggle between states based on input conditions. By storing values in memory, it allows for more dynamic and stateful operations within your logic gates, enabling more complex decision-making processes without the need for external storage or repeated calculations.
Memory String Input Parameters:
input1
This parameter represents the value you wish to store in memory. It can be of any type, allowing for flexibility in the kind of data you want to retain. The impact of this parameter is significant as it determines what information is held by the node. The default value is an empty string, but it can be set to any value you need to store.
flag
The flag parameter acts as a trigger to update the stored memory value. When set to a truthy value, it causes the node to update its memory with the current input1 value. This parameter is crucial for controlling when the memory should be updated, allowing for conditional storage based on your workflow's logic. The default value is 0, which means the memory will not update unless explicitly triggered.
Memory String Output Parameters:
anytype
The output of the MemoryNode is the current value stored in memory. This output reflects the last value that was either initially set or updated based on the flag condition. It is important as it provides the retained value that can be used in subsequent operations or logic gates, enabling continuity and state management within your workflow.
Memory String Usage Tips:
- Use the
flagparameter to control when the memory should update, allowing for dynamic changes based on specific conditions in your workflow. - Initialize
input1with a meaningful default value if you expect the memory to be used before any updates occur, ensuring that the node outputs a useful initial state.
Memory String Common Errors and Solutions:
Memory not updating
- Explanation: This error occurs when the memory value does not change despite expecting an update.
- Solution: Ensure that the
flagparameter is set to a truthy value when you want the memory to update. Without this, the node will retain its previous value.
Unexpected output type
- Explanation: The output type does not match the expected type for subsequent nodes.
- Solution: Verify that the
input1parameter is set to the correct type that matches the expected input type of downstream nodes. Adjust the input or use type conversion if necessary.
