Ok, so here is what I suggest you to do...
As I said earlier, collect your data in the OnChange event of your RadioButton control:
That way, at all times, you will have a global variable called gloRDList with all items from the correct datasource and without the records that are "Terminated".
Then on your ComboBox control, just put the following formula in the Items property:
If I'm not mistaken and if I didn't forget anything, that should do the trick...
Tell me if this works.
If it does, I'll have to explain to you then how to clear you ComboBox when you select another radio button.
@R3dKap Okay will do!
Now, what do I do with the ComBox "items" box? I currently have this located there:
If(Radio1.Selected.Value="Asset", Filter(RD_Portfolio_Compound_List,"Terminated" <> Portfolio_Status).Alias, Radio1.Selected.Value="Investment", Filter(RD_Investment_List,"Terminated" <> Portfolio_Status).Alias, Radio1.Selected.Value="Target", Filter(RD_Target_List,"Terminated" <> Portfolio_Status).Alias )
Do I replace with the global variable?
So... To clear the dropdown when you select another radio button (because the current ComboBox value may not be available in the newly selected datasource), we're going to use the Reset property of the ComboBox.
See the Reset property as a switch: when it goes from false to true it resets the control, clearing the user's selection.
To do so, just ADD the following code AFTER the actual code of your Radio1.OnChange:
And set your ComboBox.Reset to:
And that's it !
@R3dKap Thank you! That works great!!
Is there also a way to clear the button as well? FOr instance, when I submit or click the "back" button I want the button to be cleared as well. Thank you so much!!!
Gald it works... Don't forget to mark the post as the solution so other people know...
About the button... Can you be more specific ? What button ? Where is it located ? What is it used for ? What's the code of its OnSelect property ?
@R3dKap I meant the Radio1 button. While your code clears the drop down if I were to select on the new button, which is PERFECT, I also when to clear all buttons if i were to hit the "Back" or "Submit" icons on my forms - uniess thats not really necessary?
Also this form also has a gallery. This gallery displays all aossicatd data element to the member that is displayed in my text box. THerefore, then the end user knows what to select (Target, Asset, Investment).
However, I need ot add one condition to it. On the data source, there is a field called "RequestStatus" where I only want to display things in my gallery with a "RequestStatus" of "Published".
Here is my current code for my gallery:
SortByColumns(Filter(rdPartnerAssets,Title=PshipBrowseGallery.Selected.PartnershipId,StartsWith(Title, DataCardValue73.Text)), "Associated_Alias")
However when I add the other condition it doesn't seem to recognize it. I tried this with no success:
SortByColumns(Filter(rdPartnerAssets,Title=PshipBrowseGallery.Selected.PartnershipId && RequestStatus="Published",StartsWith(Title, DataCardValue73.Text)), "Associated_Alias")
Do you know where I'm going wrong? Thank yous so much!
Check it out!
Check it out!
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
The largest Power BI, Power Platform, and Data conference in New Zealand