Find Substring

This function block searches a shorter text inside a longer text and returns a boolean result indicating whether the shorter text exists in the longer one. It is ideal for simple text checks, triggers and conditional logic in your scenarios.

πŸ“₯ Inputs

Main Text The text to be searched.

Sub Text The substring to look for inside the main text.

πŸ“€ Outputs

Result Boolean value: TRUE when the substring is found in the main text, otherwise FALSE.

πŸ•ΉοΈ Controls

No Controls This block has no interactive widgets. It operates only using its input sockets.

🎯 Features

  • Fast boolean check to verify presence of a substring in a text.

  • Safe behavior when inputs are empty: returns FALSE if required text is missing.

  • Minimal configuration β€” just provide the texts and read the boolean output.

πŸ“ Usage Instructions

  1. Provide the longer text into the Main Text input socket. You can use a String Input block or any other block that outputs text.

  2. Provide the substring to search into the Sub Text input socket.

  3. Read the boolean value from the Result output socket to decide downstream actions (for example, trigger logging or alerts).

πŸ“Š Evaluation

When evaluated, this block checks whether the Sub Text exists within the Main Text and outputs the check result via the Result socket.

πŸ’‘ Tips and Tricks

  • To avoid case-sensitivity issues, combine with String Operations to convert both texts to a common case before checking.

  • Use String Merge to build dynamic messages (for example combine variable parts into a single Main Text).

  • Use Is None or Replace None before this block to ensure empty inputs are handled predictably.

  • Feed the boolean Result into a Logic Input or other logic blocks (like And, Or) to drive conditional flows.

  • Use Debug Input or Data to JSON to log matches during development and troubleshooting.

  • To store or export match events, combine the boolean output with CSV Export or Image Logger workflows depending on your data needs.

πŸ› οΈ Troubleshooting

  • No matches but expected: check for case differences or leading/trailing spaces. Normalize text with String Operations (e.g., lowercasing, trimming) before feeding this block.

  • Always FALSE: ensure both Main Text and Sub Text sockets are receiving valid text. Use Debug Input to inspect upstream values.

  • Unexpected TRUE matches: verify the exact substring provided; small typos or partial words may still produce a match depending on the content.

Last updated

Was this helpful?