Forum Discussion

StevenPearson's avatar
StevenPearson
Qrew Assistant Captain
6 years ago

Multiple bools for checkbox

I have a check box that previously was checked if X field was greater than zero. Now I need it to not be checked if Y field contains "random description". There are 38 random descriptions that have to make it unchecked otherwise checked. I have tried If([YField]="random description"),false 38 times and also Contains([YField],"random description"), false 38 times.
Neither of these worked. Suggestions?
  • AustinK's avatar
    AustinK
    Qrew Commander
    In a formula QuickBase will take the first hit it gets and do that action(checking the box or whatever.) So if the formula will match XField but you want it to be unchecked if YField is also matched in the same one it will not work. Whatever is closer to the top that first matches is what will work.

    I might be misunderstanding but it seems like you have a formula checkbox that contains either multiple formulas or one large one that has multiple conditions that overlap. I am leaning more towards the multiple formulas(for both X and Y field) in one checkbox, which should not work based on what I said above.

    I understand your formula might be large but it might help others help you if you post it.
  • Case will probably work better for you here:


    Case([Yfield],
    "description0", False,
    "description1", False,
    "description2", False,
    .
    .
    .
    .,
    True
    )
  • StevenPearson's avatar
    StevenPearson
    Qrew Assistant Captain
    I don't know which formula to use. Plus this site isn't approved so I have to do all of this on my phone.

    An example:

    Begins ([Related Unit], "BM60") will return all units beginning with BM60 to be"true". I need all of the units that begin with BM60 to be false. These are actual data names I'm working with and I have 38 units that begin with BM60 and 2024 that don't start with BM60. If the item starts with BM60, there is no charge for material even though the Related Unit has a price for material listed. So if it starts with BM60 the checkbox for material needs to be unchecked. Otherwise, for the remaining 2024 it needs to be checked. The "costs" are not visible to data entry so they would not be able to manually check the box because they can't see if there's a cost or not. This is why the check boxes have formulas. I hope that clears things up.
  • StevenPearson's avatar
    StevenPearson
    Qrew Assistant Captain
    Ryan,
    Thank you. That formulas had no errors. Now I'll have them test it. Your a life saver. Thank you again
  • You're very welcome Steve.

    How many different descriptions do you have to filter through?
  • StevenPearson's avatar
    StevenPearson
    Qrew Assistant Captain
    Only a few but it's Friday and management wants it fixed yesterday so it's all good.