Can I create a field that asks for user input if a condition is not met?

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

I would like to create a formula text field that will autopopulate when a specific condition such as a certain date is met, but will allow the user to input their own value if the condition is not met. I would also like to know if this is possible with checkbox fields. 

Photo of Brandon

Brandon

  • 120 Points 100 badge 2x thumb

Posted 4 years ago

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

QuickBaseCoach App Dev./Training, Champion

  • 65,806 Points 50k badge 2x thumb
Yes, but if you could ask more specifically we could help you with the formula.  In plain English, what is the condition and what result do you want if the condition is true and when it's not true?
Photo of Brandon

Brandon

  • 120 Points 100 badge 2x thumb
If the bid due date is after 8-15-2015 then have it display "expired", if it's not before that date then allow the user to input a value. So basically If([bid due date]>ToDate("8-15-2015"),.....
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,806 Points 50k badge 2x thumb
When our say the user can input a value, is this a date or a text entry?
Photo of Brandon

Brandon

  • 120 Points 100 badge 2x thumb
Text, but I would also like to know how to do a similar formula for a checkbox.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,806 Points 50k badge 2x thumb
You can set up a text field called [Bid Status Override], and then have a  formula of

If[Bid Due Date] > Date(2015,8,15), "Expired", [Bid Status Override])

I'm not sure what you mearn for a checkbox, but here is a guess.

If([my checkbox field]= true, "Expired", [Bid Status Override])
Photo of Brandon

Brandon

  • 120 Points 100 badge 2x thumb
So let's say I have a checkbox that is checked if a job or task is completed. I would like the checkbox to be checked if a certain condition is met, such as a multiple choice field showing the value "completed", but if that condition is not met then the user would still be able to check it manually if they wanted. I know that formula fields are not meant to be edited, and it may sound like a strange request, but I have run into a couple scenarios where it could be useful. If it is not possible then I understand.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,806 Points 50k badge 2x thumb
You are correct that you cannot edit a formula field, but you can certainly have intermediate calculation fields before you get to your final result.

If(
[My multiple choice field]="Completed", true,
[My supplementary checkbox field]=true, true)

The formula above will first check if the met,idle choice field is equal to Competed. If so, the suit is true (checked) and the formula stops there.

If false it goes on to the next test and if the override checkbox is checked, then again, true.

Else, it defaults to false.