Help

Several IF statements in a formula

Topic Labels: Data Formulas
361 3
cancel
Showing results for 
Search instead for 
Did you mean: 
user2100
7 - App Architect
7 - App Architect

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
7 - App Architect
7 - App Architect

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