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 / Combobox selection scr...
Power Apps
Unanswered

Combobox selection screen2 based on combox selection screen1

(0) ShareShare
ReportReport
Posted on by 21

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:

 

S1_Year_Combobox:

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

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

 

S1_Month_Combobox:

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

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

 

S1_Group_Combobox:

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:

 

S2_Year_Combobox:

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

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

 

S2_Month_Combobox:

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)

 

S2_Group_Combobox:

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.

Categories:
I have the same question (0)

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 377 Most Valuable Professional

#2
11manish Profile Picture

11manish 165 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 110 Super User 2026 Season 2

Last 30 days Overall leaderboard