web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / IF statement with mult...
Power Apps
Answered

IF statement with multiple conditions

(0) ShareShare
ReportReport
Posted on by

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

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    153,117 Most Valuable Professional on at

    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.

  • janineb Profile Picture
    on at

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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard