Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2010

    Question Unanswered: calculation: do ALL fields in a record contain variables

    Hi everyone,

    I'm sorry if someone has already answered this question, I tried searching through the forum but was unable to find an answer. I've included the backstory below this question in case it helps.

    My question is this...I need to create a calculation/function that returns "true" if all the fields in a specific record contain values, and false if ANY of the fields in that record are empty. I know that I can do this by creating a calculation that uses If(IsEmpty(field 1) or IsEmpty(field 2) or etc.) but then I'll need to enter the variable names for hundreds of variables into the calculation. Is there any elegant way to create a calculation that looks something like this:

    If (all of the fields in RECORD1 contain valid variables) return "true" otherwise return "false"

  2. #2
    Join Date
    Apr 2008
    Dallas, Texas
    By valid, do you mean that the fields have something in them verses they are empty? Remember that invalid fields can be things like an invalid date or something that does not pass the validation requirement for a field. It appears you are only looking for empty fields.

    If you want, you can use the FieldNames function to set a variable that has a list of all the fields in your table and, with that array, then have a loop that goes through and tests each field for whether it is empty or not. That is what I would do.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts