cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
janineb
Helper I
Helper I

IF statement with multiple conditions

Hi there

I have an Event booking form where the number of delegates allowed per room depends on the layout of the venue, e.g. if the event is in the Auditorium and people want round or square tables, the maximum number of people allowed in the venue is 60 people;  however if they want to sit "cinema style" in the Auditorium, the maximum number of people allowed is 80 people.  I have entered the following IF statement on my "Capacity" label, but the formula does not seem to work.  

If(
VenueDD.SelectedText.Value in "Executive Dining(downstairs)" && LayoutDD.SelectedText.Value in "Round Tables";
"10";
VenueDD.SelectedText.Value in "Executive Dining(downstairs)" && LayoutDD.SelectedText.Value in "Square Tables";
"10";
VenueDD.SelectedText.Value in "Executive Dining(downstairs)" && LayoutDD.SelectedText.Value in "Cinema Style";
"15";
VenueDD.SelectedText.Value in "Auditorium" && LayoutDD.SelectedText.Value in "Round Tables";
"60";
VenueDD.SelectedText.Value in "Auditorium" && LayoutDD.SelectedText.Value in "Square Tables";
"60";
VenueDD.SelectedText.Value in "Auditorium" && LayoutDD.SelectedText.Value in "Cinema Style";
"80";
VenueDD.SelectedText.Value in "Room B307 & B308" && LayoutDD.SelectedText.Value in "Round Tables";
"16";
VenueDD.SelectedText.Value in "Room B307 & B308" && LayoutDD.SelectedText.Value in "Square Tables";
"16";
VenueDD.SelectedText.Value in "Room B307 & B308" && LayoutDD.SelectedText.Value in "Cinema Style";
"20";""
)

 

Your assistance would be appreciated.

Janine

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @janineb ,

Free typed, so watch commas & brackets etc, but try this

With(
   {
      wVenue:VenueDD.Selected.Value,
      wLayout:LayoutDD.Selected.Value
   };
   Switch(
      wVenue,
      "Executive Dining(downstairs)";
      If(
         wLayout = "Round Tables" || wLayoutDD = "Square Tables";
         10;
         wLayout = "Cinema Style";
         "15"
      );
      "Auditorium"; 
      If(
         wLayout= "Round Tables" || wLayout = "Square Tables";
         "60";
         wLayout = "Cinema Style";
         "80"
      );
      "Room B307 & B308";
      If(
         wLayout= "Round Tables" || wLayoutDD = "Square Tables";
         "16";
         wLayout = "Cinema Style";
         "20"
      );
      Blank()
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

2 REPLIES 2
WarrenBelz
Super User
Super User

Hi @janineb ,

Free typed, so watch commas & brackets etc, but try this

With(
   {
      wVenue:VenueDD.Selected.Value,
      wLayout:LayoutDD.Selected.Value
   };
   Switch(
      wVenue,
      "Executive Dining(downstairs)";
      If(
         wLayout = "Round Tables" || wLayoutDD = "Square Tables";
         10;
         wLayout = "Cinema Style";
         "15"
      );
      "Auditorium"; 
      If(
         wLayout= "Round Tables" || wLayout = "Square Tables";
         "60";
         wLayout = "Cinema Style";
         "80"
      );
      "Room B307 & B308";
      If(
         wLayout= "Round Tables" || wLayoutDD = "Square Tables";
         "16";
         wLayout = "Cinema Style";
         "20"
      );
      Blank()
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

You are an absolute lifesaver!  Thank you it worked perfectly!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,719)