Forum Discussion

JacekLewandowsk's avatar
JacekLewandowsk
Qrew Member
4 years ago

IsNull doesn't work with the required fields

Hi,

I have a problem with the "IsNull" function and the date field. My date field "Assignment End Date (DD-MM-YYYY)" is required and of course it is visible on the form. I also have a formula - Rich Text field with formula (finally the formula is longer but I shortened it to check the IsNull function):

var text assignmentEndDate = If(IsNull([Assignment End Date (DD-MM-YYYY)]),"Is NULL","Not NULL");

$assignmentEndDate
The field with the formula is visible on the form.  We have two case:

  1. The "Assignment End Date (DD-MM-YYYY)" field has a value, and the formula field text is "Not NULL" - Correct
  2. The "Assignment End Date (DD-MM-YYYY)" field is empty, then QB does not generate this field in the DOM, and instead only shows "???" -Not correct

I was able to work around this problem on the form by removing the required property from the "xxx" field and selecting it in the form itself to make it mandatory. After this procedure, QB correctly calculates the formula. However, this is not a good solution because this field must be required in the entire system, not only on one form.

How do I use the "IsNull" function on fields that have the Require property set?

Best Regards
Jacek

------------------------------
Jacek Lewandowski
------------------------------

9 Replies

  • If the field is required at the field properties level, then how can it be empty?  Or is this just a one time cleanup of existing data?

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • JacekLewandowsk's avatar
      JacekLewandowsk
      Qrew Member

      On the form, I can delete data from the field, or still not complete it when adding a new record.



      ------------------------------
      Jacek Lewandowski
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Qrew Champion
        My point is that if you make the field required at the field level, then the form will prevent the record from being saved if the date is blank.  So you really do not need that rich text message field.

        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------