# Discussions

View Only

## Need to create a formula that checks 2 parameters

• #### 1.  Need to create a formula that checks 2 parameters

Posted 06-22-2018 12:22
I need a formula that says
When [Escalation] = 4HR and [2 HR Notification] is checked, check [4 HR Notification]
Thank you.

• #### 2.  RE: Need to create a formula that checks 2 parameters

Posted 06-22-2018 12:33
This should work

[Escalation] = "4HR" and [2 HR Notification] = true

• #### 3.  RE: Need to create a formula that checks 2 parameters

Posted 06-22-2018 12:36
shorter:

[Escalation] = "4HR" and [2 HR Notification]

But to be honest I think the OP needs a form rule because I don't think  [4 HR Notification] is a formula field.

• #### 4.  RE: Need to create a formula that checks 2 parameters

Posted 06-22-2018 12:43
I'm not very good with formulas. What I have now is

If(Contains([Escalation], "4HR"), true)
How do I change this?

• #### 5.  RE: Need to create a formula that checks 2 parameters

Posted 06-22-2018 12:50
I suggest that you try my formula above. It turns out in Quickbase you don�t actually need to make an
IF statement when the result is going to be true or false. You can just make a statement and if the statement evaluates to true then the checkbox will get checked.

I am in the car right now so it�s a little hard to type but if I get a chance I will write out a longer formula that will make more sense to you. But meanwhile why don�t you just try a new field with my formula and see if it works.

• #### 6.  RE: Need to create a formula that checks 2 parameters

Posted 06-22-2018 12:54
I did. It doesn't work.

• #### 7.  RE: Need to create a formula that checks 2 parameters

Posted 06-22-2018 12:57
Does it give a syntax error? If so please post your formula and the syntax error.

• #### 8.  RE: Need to create a formula that checks 2 parameters

Posted 06-22-2018 17:17
No error. I tried both formulas
• [Escalation] = "4HR" and [2 HR Notification] = true
• [Escalation] = "4HR" and [2 HR Notification]

• #### 9.  RE: Need to create a formula that checks 2 parameters

Posted 06-22-2018 19:25
Can you look at a single record and tell me what is in the field [Escalation] and what field type it is, and same for the other field?

• #### 10.  RE: Need to create a formula that checks 2 parameters

Posted 06-22-2018 19:29
[Escalation] is a text field - it contains text '2HR', '4HR', '8HR', 24HR'

• #### 11.  RE: Need to create a formula that checks 2 parameters

Posted 06-22-2018 19:37
That should work.  I don't mind having a quick look to see what the problem is, if you like, or else you will need to put in a support ticket.  I can be reached via the contact info on my website QuickBaseCoach.com

• #### 12.  RE: Need to create a formula that checks 2 parameters

Posted 06-22-2018 19:53
I just sent an invite

• #### 13.  RE: Need to create a formula that checks 2 parameters

Posted 06-22-2018 21:31
Are you putting it in an if statement?

`if([Escalation] = "4HR" and [2 HR Notification] = True,True,False)`

• #### 14.  RE: Need to create a formula that checks 2 parameters

Posted 06-22-2018 21:51
I spoke to Stephanie on a GTM and her situation was quite a bit more complex than was outlined in her post, though it was vaguely alluded to in the headline.  She in fact has multiple records for the same Ticket# and data from those multiple records needed to be combined into a formula text result.

I showed Stephanie how to make a table of unique Ticket numbers and maintain it by importing a summary report into that table after each data import of a fresh batch of tickets.   Then we did some summary fields and a formula to combine the result of the tickets with the same Unique ticket #.