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 / Using a dropdown box t...
Power Apps
Answered

Using a dropdown box to navigate to a different screen and then set a downbox value to be the same

(0) ShareShare
ReportReport
Posted on by 52

I have 4 identical screen for each company.  Each screen has a drop down box with company name.  If the company name is selected it takes me to that company screen.  I want to update the drop down box to the same screen.  How can i acheive this? 

 

On each of the combo boxes i have the following code on the on change :  

 

 

Switch(
 drpCompanyName1.SelectedText.Value,
 "TBL",
 drpCompanyName1.SelectedText.Value = "1";Navigate('Approve on hold invoices (1)'),
 "TBG",
 drpCompanyName2.SelectedText.Value = "2";Navigate('Approve on hold invoices (2)'),
 "TMK",
 drpCompanyName3.SelectedText.Value = "3";Navigate('Approve on hold invoices (3)'),
 "TBS",
 drpCompanyName4.SelectedText.Value = "4";Navigate('Approve on hold invoices (4)')
)

 

 

The drop down items are : 

["1","2","3","4"]

 

The above code does't work. if i have just the navigate, it works fine.  How do i get the text of the screen i am navigating to drop down box to match the screen that was last selected?

 

Switch(
 drpCompanyName1.SelectedText.Value,
 "TBL",
 Navigate('Approve on hold invoices (1)'),
 "TBG",
 Navigate('Approve on hold invoices (2)'),
 "TMK",
 Navigate('Approve on hold invoices (3)'),
 "TBS",
 Navigate('Approve on hold invoices (4)')
)
Categories:
I have the same question (0)
  • Verified answer
    BCLS776 Profile Picture
    8,994 Moderator on at

    Try this instead:

    Switch(
     drpCompanyName1.SelectedText.Value,
     "TBL",
     Set(varScreenNumber,"1");Navigate('Approve on hold invoices (1)'),
     "TBG",
     Set(varScreenNumber,"2");Navigate('Approve on hold invoices (2)'),
     "TMK",
     Set(varScreenNumber,"3");Navigate('Approve on hold invoices (3)'),
     "TBS",
     Set(varScreenNumber,"4");Navigate('Approve on hold invoices (4)')
    )

    Then put this in the Default property of the dropdown on each screen:

    varScreenNumber

    Hope that helps,

    Bryan

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 294 Most Valuable Professional

#2
11manish Profile Picture

11manish 210

#3
Valantis Profile Picture

Valantis 169

Last 30 days Overall leaderboard