how do I add a checkbox to a user text formula

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered

If([PLANNER_REQ]=true,"N/A")

If(not IsNull([BB_PLANNER_OVERRIDE]), [BB_PLANNER_OVERRIDE],[SITE_EXCH_ST - BB_PLANNER])

Photo of Shontay

Shontay

  • 490 Points 250 badge 2x thumb

Posted 3 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,448 Points 50k badge 2x thumb
Can you say in words what you want the formula to do?  That will help us answer your question
Photo of Shontay

Shontay

  • 490 Points 250 badge 2x thumb
If the check box is check (true) then not required(N/A), if the check box  is not check (false) and BB_PLANNER_OVERRIDE is not null then BB_PLANNER_OVERRIDE , else SITE_EXCH_ST-BB_PlANNER
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,448 Points 50k badge 2x thumb
OK, so the issue will be that you want the result to be N/A under some circumstances, but this is a User field.  A User field needs to be a User and not words N/A.

So the best we can do is this

If(
not [PLANNER_REQ] and not IsNull([BB_PLANNER_OVERRIDE]), [BB_PLANNER_OVERRIDE],
not [PLANNER_REQ], [SITE_EXCH_ST - BB_PLANNER])

In the above formula, if the Planner required is true, then neither of those conditions above will be satisfied and the result will be blank.
Photo of Shontay

Shontay

  • 490 Points 250 badge 2x thumb
Can I change the field type to text formula and convert ToUserName, then can I add N/A if check is checked
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,448 Points 50k badge 2x thumb
yes, that will work

If(
not [PLANNER_REQ] and not IsNull([BB_PLANNER_OVERRIDE]), UserToName([BB_PLANNER_OVERRIDE]),
not [PLANNER_REQ], UserToName([SITE_EXCH_ST - BB_PLANNER]),"N/A")
Photo of Shontay

Shontay

  • 490 Points 250 badge 2x thumb
Thank you