Checking if an Object is Null
  • 11 Feb 2021
  • 1 Minute to read
  • Dark
    Light

Checking if an Object is Null

  • Dark
    Light

Article Summary

Overview

The Object Is Null component checks whether a given input is "null," or non-existent. Based on its determination, the component returns either a "True" outcome if the input is null, or a "False" outcome if the input object(s) exist.

The following Flow illustrates how the Object Is Null component works by retrieving a Folder at random and evaluating its output as either a null or non-null value.




Example

  1. Navigate to a Designer Projectand select CREATE FLOW from the top Action bar.
    1. Select Flow, provide a Name, and click CREATE. 
  2. Navigate to the Toolbox tab. Then, from INTEGRATION > INTERNAL SERVICES > FOLDERSERVICE, attach a GetByID step to the Start step. 
  3. Navigate to the GetByID step's Properties tab and under INPUTS, map Flow Data.FolderId to id.
    This step is used to retrieve a Folder based on its unique Id.

    Note: This will return no folder data because no Folder actually exists.
  4. Connect an Object Is Null step to the Get By Id step's Done path, from the DATA category of the Toolbox tab.
  5. Connect both the True and False paths to the End step.
    In most design instances, these two paths would be used to direct the two different results to different Flow logic. 
  6. Navigate to the Object Is Null step's Properties tab; under INPUTS, Select From Flow map GetByID1_Output to Value.
  7. Save the Flow. then if desired, close via X.



Debug

  1. From the Flow Designer, click the Debug link,
  2. Click the START DEBUGGING button. 
    The Flow will run successfully and identify the GetByID1_Output as null object, resulting in a True outcome.

    To evaluate an actual Folder, users may hard code a Folder ID.

    It is possible to retrieve a Folder ID in the Portal via the Get Folder ID action. Mapping this result as a Constant input value will make the Object Is Null 1 step evaluate as False, assuming that the Folder contains entities.






Was this article helpful?

What's Next