Preview Text Merge:
The PreviewTextMerge node is designed to aggregate multiple text inputs, allowing you to preview them collectively and output a combined string along with individual passthrough strings. This node is particularly useful when you want to consolidate multiple text preview nodes into a single, streamlined preview, making it easier to manage and visualize text data. By specifying the number of active text inputs and a separator, you can customize how the texts are merged and displayed. This functionality is beneficial for debugging and organizing text data, providing a clear and concise overview of the combined text output.
Preview Text Merge Input Parameters:
count
The count parameter determines how many of the available text inputs are active and included in the merging process. It accepts an integer value with a minimum of 1 and a maximum of 8, with a default value of 4. This parameter allows you to control the number of text inputs that are considered for merging, enabling flexibility in how much text data is previewed and combined.
separator
The separator parameter specifies the string used to separate each active text input in the combined output. It accepts a string value, with a default of \n (newline), allowing you to define how the merged text appears. This parameter is crucial for formatting the combined text output, ensuring that the individual text inputs are clearly delineated.
emit_outputs
The emit_outputs parameter is a boolean that determines whether the node should output the combined text and passthrough strings. By default, it is set to False. When set to True, the node will produce the combined text and individual text outputs; otherwise, it will only generate a preview without emitting the outputs. This parameter is useful for controlling the node's behavior based on whether you need the actual outputs or just a preview.
text1, text2, ..., text8
These optional parameters represent the individual text inputs that can be merged. Each parameter accepts a string value, with a default of an empty string. You can provide up to eight different text inputs, and the count parameter will determine how many of these are actively used in the merging process. These inputs allow you to specify the text data that you want to aggregate and preview.
Preview Text Merge Output Parameters:
combined
The combined output is a single string that contains all the active text inputs merged together, separated by the specified separator. This output provides a consolidated view of the text data, making it easier to analyze and understand the overall content.
text1, text2, ..., text8
These outputs are the passthrough strings corresponding to each of the individual text inputs. They allow you to access the original text inputs after the merging process, providing flexibility in how you handle and utilize the text data. Each output will contain the respective text input if it was active, or an empty string if it was not included in the merging process.
Preview Text Merge Usage Tips:
- Use the
countparameter to control the number of text inputs you want to merge, which can help in focusing on specific data sets without overwhelming the output with unnecessary information. - Customize the
separatorto format the combined text output according to your needs, such as using commas, spaces, or other delimiters to enhance readability. - Set
emit_outputstoTruewhen you need to use the combined and passthrough outputs in subsequent nodes, andFalsewhen you only need a preview for inspection purposes.
Preview Text Merge Common Errors and Solutions:
Invalid count value
- Explanation: The
countparameter is set to a value outside the allowed range of 1 to 8. - Solution: Ensure that thecountparameter is set to an integer between 1 and 8.
Separator not defined
- Explanation: The
separatorparameter is not provided, leading to potential formatting issues in the combined output. - Solution: Specify a valid string for the
separatorparameter to ensure proper formatting of the merged text.
Emit outputs not functioning
- Explanation: The
emit_outputsparameter is not set correctly, resulting in unexpected behavior regarding output generation. - Solution: Verify that the
emit_outputsparameter is set toTrueif you require the node to produce outputs, orFalseif only a preview is needed.
