How to change rules to calculations?

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
I have two related tables to track employee time. The parent table contain information of each employee i.e.; Name, employee id, hire date, etc.. The child table containing their weekly time report

I have two dynamic form rules setup on the parent form to apply and reverse on certain conditions. I would like to create formula which combine both rule conditions instead of having to edit and save the form so the rules are applied when applicable.  

I have tried several if() formulas with no luck.  I have attached a copy of both rules for more detail.

Any help would be greatly appreciated.



Thank you in advance.

 

Photo of Jerry

Jerry

  • 0 Points

Posted 4 years ago

  • 0
  • 1
What result do you want if empl accrue PIN is not CWA?
Photo of Jerry

Jerry

  • 0 Points
If not CWA, the results should calculate [Total Work Hours]*[Vaca Accrue Ratio]).

Thank you,
Sorry, but that does not make sense. You were asking how to automatically set a checkbox field. What do you want to checkbox field to be equal to if not CWA.
Photo of Jerry

Jerry

  • 0 Points
I am sorry. If now CWA, the check box should "False"/unchecked.
try this

IF([Empl Accrue PIN] = "CWA" and [Total Work Hours] > 2080, true, false)
Photo of Jerry

Jerry

  • 0 Points
I had this formula

If([Related Accrue Plan] = "CWA" & [Total Work Hours] > 2080, true, false)

and it would not work. I changed the "&" to "and" and it works. I guess it makes a difference. This is what you get for working on formulas into the late hours.

Thank you,
No problem. It is just a matter of getting used to the syntax. In quick base the & character is used to "add "two pieces of text together. In other words to concatenate them into a string together. And the word AND is used to join a test for two different logical expressions.