Forum Discussion

StephanieMilbur's avatar
StephanieMilbur
Qrew Member
2 years ago

Formula Checkbox Help Needed

I need a Formula Checkbox that checks against emails entered in a field on another table or a list of emails.



------------------------------
Stephanie Milburn
------------------------------

  • Stephanie,

    A little more detail about your issue would be helpful.   Please describe the action desired by the formula.



    ------------------------------
    Don Larson
    ------------------------------
  • BrianSeymour's avatar
    BrianSeymour
    Qrew Assistant Captain

    Hey Stephanie,

    As Don mentioned, it's difficult to offer guidance without a better understanding of what your hoping to achieve.

    The skeleton would look like something like the following, where you'll either return true or false. Note that you can have multiple "tests" within your Formula Checkbox logic.

    If (
        // Check the box when …
        [Some Field Status] = "Active", true,

        // Or when  …
        [# of Some Related Records] > 0, true,

        // Default to unchecked
        false
    )



    ------------------------------
    Brian Seymour
    ------------------------------
    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend

      I see we are all trying to read Stephanie's mind here. Let's try my mind reading. I think she has a record with an email address on it, and she wants to know if that email exists in another table.

      This can be done with the formula query.   Example below this would be a formula checkbox field type.  But replace the 99 with the field ID in the other table which holds the email address.  Would replace this table reference here  [_DBID_OF_OTHER_TABLE]  with the table name that you will see in the advanced settings for the other table.  

      var text QUERY = 
        "{99.EX.'" & [Email Address] & "'}";

      var number NumEmailsInOtherTable=
      Size(
      GetRecords($QUERY, [_DBID_OF_OTHER_TABLE]));

      IF($NumEmailsInOtherTable>0, true)



      ------------------------------
      Mark Shnier (Your Quickbase Coach)
      mark.shnier@gmail.com
      ------------------------------

      • StephanieMilbur's avatar
        StephanieMilbur
        Qrew Member

        Sorry for making this one diffcult but yes you are all on the right track.  mark has the scenario correct and the formula appears to be spot on. I am running a User test soon.  Thanks so much



        ------------------------------
        Stephanie Milburn
        ------------------------------