Hi Folks -
I have a forum that has a data source of "rdPartnerAssets" and a ComBox that is populates with a certain source (Table.Column) based on a Radio button selection on my form.
However, I would like if I can filter ComboBox with another field from that source. Each source has a SP column called "Portfolio_Status" and I'd like to return all value from the particular data source where "Portfolio_Status" <> Terminated.
My current formula is as follows:
I tried th filter function, but can't seem to get it to fire. Thanks!
Solved! Go to Solution.
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 !
If(Radio1.Selected.Value="Asset", RD_Portfolio_Compound_List.Alias, Radio1.Selected.Value="Investment", RD_Investment_List.Alias, Radio1.Selected.Value="Target", RD_Target_List.Alias )
If I'm understanding this right, you want to change which table's data appears here based on different values in the radio control.
Next you want to filter the content where the status is not terminated.
It could look like this:
If(Radio1.Selected.Value="Asset", Filter(RD_Portfolio_Compound_List,Not(Status="Terminated")).Alias, Radio1.Selected.Value="Investment", Filter(RD_Investment_List,Not(Status="Terminated")).Alias, Radio1.Selected.Value="Target", Filter(RD_Target_List,Not(Status="Terminated")).Alias )
Reading from inside out. This filters the Portfolio Compound List to show only the records where the status is not terminated when the value selected in the radio is Asset, else it moves onto the other conditions. In each case, only show the Alias column.
As a rule of thumb, even though each table has the same structure, I generally avoid fitting different tables into the same control. That's just me nitpicking.
@simms7400 - Just to confirm, I assume that you amended Mr Dang's condition to refer to your 'Portfolio_Status' field, rather than Status. Could you clarify the data type of 'Portfolio_Status'? Is it a Choice column? Do the data items in 'Portfolio_Status' include exactly the text 'Terminated'? (ie, with a capital T, no trailing spaces)
@Mr-Dang-MSFT - I see what you're trying to do - Switching this question into a quiz ;-)
Do you want to filter the records not equal to “ Terminated"?
Could you tell me what is the data type of 'Portfolio_Status' column?
I assume that's a text column.
I recommend you try this formula:
Filter(RD_Portfolio_Compound_List,"Terminated" <> Status).Alias,
Filter(RD_Investment_List,"Terminated" <> Status).Alias,
Filter(RD_Target_List,"Terminated" <> Status).Alias
Community Support Team _ Phoebe Liu
Maybe your problem comes from the fact that a combo box items should (most of the time) be fed with the Choices() function in order to work properly.
So, assuming your Alias field is a choice or lookup field, this means that the above formulas given by @Mr-Dang-MSFT or @v-yutliu-msft should more likely look like this (by example for the Portfolio datasource):
TrimEnds(Lower(Value))="terminated" // <- make sure "terminated" is all lowercase
Note the TrimEnds() and Lower() functions to make sure equality of string values won't be bothered by extra spaces or upper/lowercase letters.
Another idea would be to do the following:
Filter( Choices(RD_List_DataSource.Alias), Not( TrimEnds(Lower(Value))="terminated" // <- make sure "terminated" is all lowercase ) )
Give us feedback once you'll have made some more tests...
Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.
Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.
Continue your learning in our online communities.
Features releasing from October 2019 through March 2020
Coming to a city near you
Fill out a quick form to claim your user group badge now!
Connect, share, and learn with your peers year-round
Register by September 5 to save $200