Replace None
This function block provides a simple fallback mechanism: when the primary input is missing (None), it outputs a user-provided replacement value so downstream blocks continue to receive valid data.
π₯ Inputs
Input Data(Generic) β Primary data to be checked for presence.New Data(Generic) β Replacement data to use when the primary input isNone.
π€ Outputs
Replaced Data(Generic) β The resulting data: either the originalInput Dataif present, orNew Datawhen the input isNone.
πΉοΈ Controls
This block has no interactive controls.
π― Features
Minimal, reliable fallback for missing values to prevent breaks in a flow.
Generic data type support β works with images, numbers, text, lists, or other data types.
Lightweight and deterministic behavior β always passes either the original or the replacement value.
π Usage Instructions
Connect the source you want to guard to
Input Data.Provide a default or fallback value to
New Data. This can be a static value, a previously stored value, or a placeholder image/number/text.Read the result from
Replaced Dataand continue the pipeline as usual.
Example uses: provide a placeholder image when a camera feed briefly fails, supply a default number for calculations, or pass a backup string when a network response is missing.
βοΈ How it runs
When the flow runs, this block checks whether Input Data is present. If it is present, that value is forwarded. If it is None, the block forwards the value supplied to New Data. If both are None, the output will be None (so ensure a meaningful fallback is provided when needed).
π‘ Tips and Tricks
Combine with
Is Noneto create branching logic (for example, trigger an alert only when the original input is missing).Use with
Data Memoryto freeze and re-use the last valid value as theNew Datafallback.When dealing with image streams (e.g., from
Camera USBorStream Reader), feed a representative static image intoNew Dataso viewers likeShow Imagealways have something meaningful to display.Pair with
Debug InputorData to JSONto log when fallbacks are used, helping you monitor data quality over time.For saving fallback events or results, link
Replaced DatatoCSV ExportorImage Loggerdepending on data type.
π οΈ Troubleshooting
If you still see
Noneat the output, confirm a non-Nonevalue is provided to eitherInput DataorNew Data.For image pipelines: if the fallback appears but looks wrong, check the format (color channels, size) of the
New Datato match downstream expectations.
Last updated
Was this helpful?