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 / Switch and using neste...
Power Apps
Answered

Switch and using nested IF

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I'm trying to navigate to a correct form based on Category(lbl_AllRequestsCategory.Text)

Then based upon another variable "Status" decide which form to go to ?

 

This is not working below

 

Switch(lbl_AllRequestsCategory.Text
,"NEW PRICING OPPORTUNITY"
,
If(dtbl_AllRequests_NoFilter.Selected.Status = "Submitted" Or dtbl_AllRequests_NoFilter.Selected.Status = "Pending",
Navigate(scrn_PREX_Reserve_NCPricingOrig_PR2)
Or
If(dtbl_AllRequests_NoFilter.Selected.Status = "Completed",
Navigate(scrn_Prex_NCPricingOrig_DeadView_PR2)
Or
If(dtbl_MyRequests_qs.Selected.Status = "Pending - On Hold for Clarification",
Navigate(scrn_PREX_Reserve_NCPricingOrig_PR2)
Or
If(dtbl_MyRequests_qs.Selected.Status = "Pending - Escalation in Progress",
Navigate(scrn_PREX_Reserve_NCPricingOrig_PR2)
Or
If(dtbl_MyRequests_qs.Selected.Status = "Pending - Cost Support Request with Supplier",
Navigate(scrn_PREX_Reserve_NCPricingOrig_PR2)
Or
If(dtbl_MyRequests_qs.Selected.Status = "Rejected",
Navigate(scrn_PrexSeller_RejectedView)
,"")

,""),""),""),""),"")
)

Categories:
I have the same question (0)
  • Verified answer
    Shaheer Ahmad Profile Picture
    2,194 Moderator on at

    Try This:

    Switch(
     lbl_AllRequestsCategory.Text,
     "NEW PRICING OPPORTUNITY",
     Switch(
     dtbl_AllRequests_NoFilter.Selected.Status,
     "Submitted", Navigate(scrn_PREX_Reserve_NCPricingOrig_PR2),
     "Pending", Navigate(scrn_PREX_Reserve_NCPricingOrig_PR2),
     "Completed", Navigate(scrn_Prex_NCPricingOrig_DeadView_PR2)
     ),
     "OtherCategory", // Add more categories and form navigations as needed
     Switch(
     dtbl_MyRequests_qs.Selected.Status,
     "Pending - On Hold for Clarification", Navigate(scrn_PREX_Reserve_NCPricingOrig_PR2),
     "Pending - Escalation in Progress", Navigate(scrn_PREX_Reserve_NCPricingOrig_PR2),
     "Pending - Cost Support Request with Supplier", Navigate(scrn_PREX_Reserve_NCPricingOrig_PR2),
     "Rejected", Navigate(scrn_PrexSeller_RejectedView)
     ),
     // Default case, you can add more categories as needed
     ""
    )

     

    Mark as solution if this solves your issue. Give this reply a thumbs up. Reply to this thread if you need further assistance. Thanks

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you so very much...Testing now.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard