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

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 Team
Community Support Team

Re: Pass value from radio button to filter drop down box

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 Team
Community Support Team

Re: Pass value from radio button to filter drop down box

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

spow5666
Level: Powered On

Re: Pass value from radio button to filter drop down box

@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
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

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