cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Change dropdownlist selected item from another screen

Is there a way to do this? My dropdownlist has currently over 3000 items fetched from a sql server table. It's not convenient to select the item I want. So I've come up with an idea to create a browse screen with a textbox to search and a browsegallery to select the item. The only problem is, my formula does not do select the item.

 

If(ParentForm = "Opportuny", dcCustomer.Selected.Value = BrowseGallery_Customer.Selected.CustomerName;Back(), Navigate(CustomerDS, ScreenTransition.None))

 

This formula is bound to the OnSelect action of the textbox within the browsegallery from the second screen.

 

ParentForm = context passed from the first screen

dcCustomer = dropdownlist from frist screen

Navigate(CustomerDS, ScreenTransition.None) = if the ParentForm is "CustomerBS" then navigate to CustomerDS

 

Any help would be appreciated.

 

Thanks in advance.

 

Regards,

 

Kevin

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Hi Kevinman,

 

Please consider to use UpdateContext function to update the context variables of the new screen.
Please check this documentation about Navigate function:
https://powerapps.microsoft.com/en-us/tutorials/function-navigate/
Navigate( Screen, Transition [, UpdateContextRecord ] )

 

My steps for a reference:
1. Set Items property of Gallery1 on Screen1 as: Data source. Add a Next arrow button within the Gallery.
Set the OnSelect property of the Next arrow as: Navigate(Screen2,ScreenTransition.Fade,{MY:Gallery1.Selected.Title})
2. On Screen2, add a Dropdown control, set its Items property as: Datasource.Title. Then set its Default property as: MY.
3. When I select one item on the Gallery and navigate to Screen2, the value I selected will be shown on the Drop down control.

 

Hope this could be a reference for you.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Highlighted
Community Support
Community Support

Hi Kevinman,

 

My understanding is that you want to filter an item from your Data base.
So may I suggest you to configure the Items property of the gallery with Filter function?
You could configure it likes Gallery.Items=Filter(DataBase,StartsWith(Title,Text input1.Text)). Then when you enter an value in the Text input control, all the related information will be shown on the app.

 

About Filter function and StartsWith function, please see these two documentations for a reference:
https://powerapps.microsoft.com/en-us/tutorials/function-filter-lookup/
https://powerapps.microsoft.com/en-us/tutorials/function-startswith/

 

If I misunderstand you, please feel free correct me and send me more details about your scenario.


Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Anonymous
Not applicable

Hi Mabel,

 

Thanks for your reply, but this is not what I seek. What I really want is when I select a gallery item from screen 1, then a dropdownlist item from screen 2 will automatically be selected with a matching id (eg customerid).

 

Regards,

Kevin

 

Highlighted

Hi Kevinman,

 

Please consider to use UpdateContext function to update the context variables of the new screen.
Please check this documentation about Navigate function:
https://powerapps.microsoft.com/en-us/tutorials/function-navigate/
Navigate( Screen, Transition [, UpdateContextRecord ] )

 

My steps for a reference:
1. Set Items property of Gallery1 on Screen1 as: Data source. Add a Next arrow button within the Gallery.
Set the OnSelect property of the Next arrow as: Navigate(Screen2,ScreenTransition.Fade,{MY:Gallery1.Selected.Title})
2. On Screen2, add a Dropdown control, set its Items property as: Datasource.Title. Then set its Default property as: MY.
3. When I select one item on the Gallery and navigate to Screen2, the value I selected will be shown on the Drop down control.

 

Hope this could be a reference for you.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Anonymous
Not applicable

Hi Mabel,

 

I have done your suggested steps and it works flawlessly. Thank you!

 

Regards,

Kevin

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (3,330)