Help

Save the date! Join us on October 16 for our Product Ops launch event. Register here.

Several IF statements in a formula

Topic Labels: Data Formulas
295 3
cancel
Showing results for 
Search instead for 
Did you mean: 
user2100
6 - Interface Innovator
6 - Interface Innovator

I have 2 datafields, room type (single room & double room) and guests (1 to 2 names)

if in singleroom and the guest (the volume is 1) should say "occupied" in the formulafield and

if in room type (double room) it says and guest (the volume 2) then “Occupied” should also appear in the formula field

MyCode:

 

 

 

IF(AND(room type = "double room", {client overview} = VALUE(2), room type = "single room", {client overview} = VALUE(1)), "occupied")

 

 

 

3 Replies 3
Mike_AutomaticN
7 - App Architect
7 - App Architect

What field type is your Client Overview field? Would you please provide a screenshot?

Best,

Mike, Consultant @ Automatic Nation

Does this look right?

Screenshot 2024-09-05 at 10.03.33 PM.png

IF(
  AND(
    {Room Type} = "Double room",
    {Count (Client overview)} = 2
  ),
  "Occupied"
) &
IF(
  AND(
    {Room Type} = "Single room",
    {Count (Client overview)} = 1
  ),
  "Occupied"
) 

Link to base

user2100
6 - Interface Innovator
6 - Interface Innovator

Yes, that's exactly how I imagined it. I thought about it for ages. thank you very much for the help.