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

Pass value from radio button to filter drop down box

Working on my timesheet app. I want users to choose from a radio button on the 'Enter Time' screen which indicates whether they will enter 'Work Time' or 'Non-Work Time'.  Those two values come from Excel table TimeType.Time_Description. 

 

I want to pass the selected value to a dropdown list which has AllowedValues property:  DataSourceInfo([@WBS], DataSourceInfo.AllowedValues, "WBS_Code")

 

On the Excel table WBS the dropdown's values come from, there is also Time_Type which has values the same as TimeType.Time_Description so I want to use that to filter the values available in the dropdown list.

 

I set the radio button's OnSelect property to:  Set(Var_Time_Type,TimeType.Time_Description) in the hope that I could then filter or somehow pass that variable to the dropdown list's AllowedValues property. 

 

Any suggestions would be appreciated (including a completely different way of doing it).

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @spow5666 ,

Could you please share a bit more about your scenario?

Do you want to filter the Dropdown box options based on the selected Radio button value?

 

I have made a test on my side, please consider take a try with the following workaround:

Set the Items property of the Radio control (Radio1) to following:

TimeType.Time_Description

Set the Items property of the Dropdown box (Dropdown1) to following:

Distinct(
         Filter([@WBS], Time_Type = Radio1.Selected.Time_Description),
         WBS_Code
)

Please consider take a try with above solution, then check if the issue is solved.

 

If the Dropdown box is included within a Edit form, and you want to save the selected value back to your data source, please set the Update property of the Data card which contains the Dropdown box to following:

Dropdown1.Selected.Result

 

Best regards,

Community Support Team _ Kris Dai
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

2 REPLIES 2
Community Support
Community Support

Hi @spow5666 ,

Could you please share a bit more about your scenario?

Do you want to filter the Dropdown box options based on the selected Radio button value?

 

I have made a test on my side, please consider take a try with the following workaround:

Set the Items property of the Radio control (Radio1) to following:

TimeType.Time_Description

Set the Items property of the Dropdown box (Dropdown1) to following:

Distinct(
         Filter([@WBS], Time_Type = Radio1.Selected.Time_Description),
         WBS_Code
)

Please consider take a try with above solution, then check if the issue is solved.

 

If the Dropdown box is included within a Edit form, and you want to save the selected value back to your data source, please set the Update property of the Data card which contains the Dropdown box to following:

Dropdown1.Selected.Result

 

Best regards,

Community Support Team _ Kris Dai
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

@v-xida-msft  thanks very much.  Your suggestions have worked perfectly. 

PS: I've also deleted the Radio button's OnSelect formula in which I originally created a variable as it's no longer required.

Helpful resources

Announcements
News & Announcements

Community Blog

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

Power Apps Community Call

Power Apps Community Call- January

Check out the Power Apps Community Call for January 2021

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

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