Discussions

 View Only
  • 1.  If/then with blank field and checkbox

    Posted 11 days ago
    Edited by Nicole Cordeiro 11 days ago

    Hello friends, question about a field that used to work for me but no longer does. 

    In one form, one field will either be blank or have a number in it, we'll call it "tag number". If "tag number" is blank, I set up a checkbox to check. If "tag number" is filled out, then the checkbox will not check. 

    the formula I used that used to work was

    Checkbox-formula

    if([tag number]=null, true, false

    Am I doing something wrong? The box is not showing checked when I leave the Name field blank. 

    When I use 

    If(IsNull([tag number]), false, true)

    It checks whether it is blank or not

    Help



    ------------------------------
    Nicole Cordeiro
    ------------------------------



  • 2.  RE: If/then with blank field and checkbox

    Posted 11 days ago

    The correct formula is this. 

    if(Trim([tag number])="", true, false)

    in order to test a text field for blank you check if it's equal to empty quotes.  


    I'd like to wrap it in the trim function just in case someone enters some invisible spaces into the text field. 



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



  • 3.  RE: If/then with blank field and checkbox

    Posted 10 days ago

    If Tag Number is actually a Numeric field - you can also user the Nz() function. It will return 0 if the value is entered as 0 or null - basically a way to force it to render as 0 in all cases. You could then do if( Nz([Tag Number]) > 0, true, false)



    ------------------------------
    Chayce Duncan
    ------------------------------



  • 4.  RE: If/then with blank field and checkbox

    Posted 10 days ago

    thank you, everyone! the second option worked, and then I just flipped the true,false to false, true and that worked! thank you both for your help! I'll be able to use the first option I believe with another challenge. Thank you!!!



    ------------------------------
    Nicole Cordeiro
    ------------------------------