1 Reply Latest reply: May 15, 2014 10:04 AM by Olly Bond RSS

    Replace null values with default values

    jdino73 _

      Hello,

      When starting a model from a database csv file, there is an option that says

      replace nulls with default values. What does this exactly mean? I have been having alot of trouble with null values.

        • Replace null values with default values
          Olly Bond

          Hello JDino,

           

          When you are importing data from a database, such as a CSV file, Monarch lets you replace empty cells with default values. For numeric fields, 0 is the usual default value, for character fields, "" (the empty string), and for dates, 1 January 1970. You can change these settings somewhere if you need.

           

          It's worth choosing this option because null fields can be a pain later on. If you have a calculated field based on one of your database fields, a null value in the database field will produce (usually) a null value in the calculated field, for example.

           

          You can get around it by including:

           

          if(isnull(fieldname)=1;value-when-null;fieldname)

           

          in your calculated fields, or by using a lookup field with rules to replace null inputs.

           

          HTH,

           

          Olly