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

Announcements

News and Announcements icon
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
    155,896 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 316 Most Valuable Professional

#2
11manish Profile Picture

11manish 242

#3
Valantis Profile Picture

Valantis 198

Last 30 days Overall leaderboard