Data360 Analyze

 View Only
  • 1.  Check if property is empty?

    Posted 02-16-2024 10:36

    Is there a way to check if the value of a property is empty in a node?

    like

    if {{^PROPERTY_NAME^}} is None:
    nothing i try works, i just need to set a default value if the prop is blank


    ------------------------------
    Geoff Geoff
    Windstream Communications
    Little Rock AR
    ------------------------------


  • 2.  RE: Check if property is empty?

    Posted 02-20-2024 09:11

    Hi Geoff, 

    I'm sure theres a different way but one solution I've used it to set a default value for the property if its blank and then check for that default value, 

    Example: if {{^PROPERTY_NAME=BLANK^}} == "BLANK":

    This way if no property is entered, the property reference will default to "BLANK" which you can then check for in your if statement



    ------------------------------
    Alex Day
    Knowledge Community Shared Account
    ------------------------------



  • 3.  RE: Check if property is empty?

    Employee
    Posted 02-27-2024 10:34
    Edited by Adrian Williams 02-27-2024 10:35

    The example will need quotes around the property substitution to be valid, e.g. 

    if "{{^PROPERTY_NAME=BLANK^}}" == "BLANK":

    Your solution works well but you may also want to consider using the built-in functionality {{?propertyname?}} that is described in the Advanced Substitutions section of the Help documentation. The substitution will return "true" if a value has been defined. The equivalent of your example would be:

    if "{{?MyProperty?}}" == "false":



    ------------------------------
    Adrian Williams
    Precisely Software Inc.
    ------------------------------