Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Combobox selection screen2 based on combox selection screen1

Hi All,


I have the following situation:


Screen1 - Total Values, selected based on 3 combobox for year, month and total group, with the following commands:



Items: SortByColumns(Distinct(IndicMensal;Year);"Result";Descending)

DefaultSelectedItems: LastN(Distinct(IndicMensal;Year).Result)



Items: SortByColumns(Filter(IndicMensal;Year=S1_Year_Combobox.Selected.Result);Month;Descending).Month

DefaultSelectedItems: LastN(Filter(IndicMensal;Year=S1_Year_Combobox.Selected.Result).Month)



Items: ["Segment";"Category";"Local";"Profile"]

DefaultSelectedItems: ["Segment"]


From this screen, users can go to Screen 2/Details in two different ways: selecting a specific total group line, after selecting Year/Month/Group from Combobox or from a Buttom, that also goes to Screen 2.


In screen 2, there will be again the same 3 Comboboxes, which I would like to be pre-populated with selection from screen 1 (if comes from total group line) or empty if it comes from the Buttom.


In the Gallery for total group lines, I have included a variable to inform screen 2 how it cames from screen1:


OnSelect: Navigate(Screen2; ScreenTransition.Cover;{S1Way: "Line"; S1Year: S1_Year_Combobox.Selected.Result; ; S1Month: S1_Month_Combobox.Selected.Month; S1Group: S1_Group_Combobox.Selected.Value})


On the comboboxes screen 2 included the follwing commands:



Items: SortByColumns(Distinct(IndicMensal;Year);"Result";Descending)

DefaultSelectedItems: If(S1Way="Line";FirstN(Filter(IndicMensal;Year=S1Year).Year);LastN(Distinct(IndicMensal;Year).Result))



Items: SortByColumns(Filter(IndicMensal;Year=S2_Year_Combobox.Selected.Result);Month;Descending).Month

DefaultSelectedItems: If(S1Way="Line";FirstN(Filter(IndicMensal;Year=S1Year && Month=S1Month).Month);LastN(Filter(IndicMensal;Year=S2_Year_Combobox.Selected.Result).Month)



Items: ["Segment";"Category";"Local";"Profile"]

DefaultSelectedItems: If(S1Way="Line";S1Group;"Segment")


I'm having two problems:


1 - I can't find the way to set DefaultSelectedItems for S2_Group_Combobox

2 - Year and Month from screen 2 do not come as DefaulSelectedItems for comboboxes screen2


I would appreciate any help on solving theses issues.


Regards, Marco.

Helpful resources

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,776)