cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
SamVector
Level: Powered On

Navigate Variable Context

Hello All,

 

I have a welcome screen where i have a textbox and a few buttons with OnSelect and Navigate functions. For the Navigate function, it works fine and sends me to the right spot. But I'd like it to chose a specific option from a dropdown screen in the following form. If I could lock that dropdown, that would be even better. 

 

If(TextInput1.Text="Password",Navigate(EditScreen,ScreenTransition.None,{DataCardValue1: "Option1"}))

 

This is what I currently have for OnSelect, but it doesn't pick the option from the dropdown, it just navigates to the form and disregards the last portion of the formula. 

1 ACCEPTED SOLUTION

Accepted Solutions
PowerApps Staff AKotb
PowerApps Staff

Re: Navigate Variable Context

The second part of the navigation command is used to define the navigation context (variables that are going to be defined in the target screen)

 

what we need to do is connect this variable to the default value of the dropdown control.

 

so the onSelect formula can be something like this

 

Button1.OnSelect = 
If( TextInput1.Text="Password",
Navigate(EditScreen,ScreenTransition.None, {DefaultValue: "Option1"}))

and the DropDown.Default should be something like this

 

Dropdown1.Default = DefaultValue

 

 

View solution in original post

5 REPLIES 5
PowerApps Staff AKotb
PowerApps Staff

Re: Navigate Variable Context

The second part of the navigation command is used to define the navigation context (variables that are going to be defined in the target screen)

 

what we need to do is connect this variable to the default value of the dropdown control.

 

so the onSelect formula can be something like this

 

Button1.OnSelect = 
If( TextInput1.Text="Password",
Navigate(EditScreen,ScreenTransition.None, {DefaultValue: "Option1"}))

and the DropDown.Default should be something like this

 

Dropdown1.Default = DefaultValue

 

 

View solution in original post

SamVector
Level: Powered On

Re: Navigate Variable Context

The welcome screen will have 5 buttons with seperate passwords that send them to the same screen with the dropdown choice picked. So I don't think the default value will work in this instance. 

PowerApps Staff AKotb
PowerApps Staff

Re: Navigate Variable Context

you can send multiple values in the navigation context

 

Button1.OnSelect = 
If( TextInput1.Text="Password",
Navigate(EditScreen,ScreenTransition.None, {Value1: "Option1", Value2: "Option2"}))

 

SamVector
Level: Powered On

Re: Navigate Variable Context

How would you set 5 seperate default values for the dropdown and make sure it choses the right one depending on the button clicked on the welcome screen?

PowerApps Staff AKotb
PowerApps Staff

Re: Navigate Variable Context

Every button will have a different onSelect forumula

 

Button1

Button1.OnSelect = 
If( TextInput1.Text="Password",
Navigate(EditScreen,ScreenTransition.None, {Value1: "Selected", Value2: "default"}))

 

Button2

Button2.OnSelect = 
If( TextInput1.Text="Password",
Navigate(EditScreen,ScreenTransition.None, {Value1: "default", Value2: "Selected"}))

 

 

Dropdown1 will use Value1 as the default property value, Dropdowwn1 will use Value2 as the default property value

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 308 members 4,772 guests
Please welcome our newest community members: