How do I create a conditional field?

  • 0
  • 2
  • Question
  • Updated 2 years ago
  • In Progress

does anyone know what the rule would be for something like this?  

  • if this checkbox is checked, make these fields required
  • if this checkbox is unchecked, make these same fields NOT required 

or even better - 

  • if this checkbox is checked, REVEAL these fields and make them required
  • if this checkbox is unchecked, HIDE these same fields and make them NOT required
Photo of Regina Tan

Regina Tan

  • 120 Points 100 badge 2x thumb

Posted 2 years ago

  • 0
  • 2
Photo of Gaurav Sharma

Gaurav Sharma

  • 5,884 Points 5k badge 2x thumb
What are you asking? How to apply these rules or what is the best way to apply the above conditions?
Photo of Regina Tan

Regina Tan

  • 120 Points 100 badge 2x thumb
I guess both because i'm still really new to quickbase! 
Photo of Regina Tan

Regina Tan

  • 120 Points 100 badge 2x thumb
i saw this formula but i'm not sure if it is right.

IF(([Status]="Completed"),[End Date]-[Start Date],Today()- [Start Date])

I need to know how to change "[End Date]-[Start Date],Today()- [Start Date])" to something that allows me to pick a particular date instead of a standard date formula. Is that possible?
Photo of Michael Barrow

Michael Barrow

  • 2,216 Points 2k badge 2x thumb
You are talking about dynamic form rules.

You also should know that these are very straightforward to set up in forms, but there's a BIG loophole in QuickBase around the fact that grid edit or API calls will not have access to those rules, so users could circumvent your business logic as stated above. The form entry can lock them down to what you want, but not grid edit. This is the single biggest thing I wish QB would address, as table validation rules should be independent from forms and tied to the table setup more directly.
Photo of John Thomas

John Thomas

  • 1,082 Points 1k badge 2x thumb
Create a formula field checkbox 

Condition should be like eg: if(condition, 1,0)

Then go to forms- click on dynamic rules - Create a new rule

If Formula Checkbox is checked then create the actions like this , make the field as required[what ever fields that you need to make it as required] , also automatically reverse action will be created by quick base itself , you can see on Otherwise Heading below actions on corresponding rule.