0

I am trying to filter a table from Dynamics 365 by selecting a radio button which will update the table on the screen.

The user has three options to choose from: "School", "Business", "All".

When the user selects "All" then it should look in the "Accounts" table and search the "industrycode" column for blank values.

Below is a working Filter(), which returns the result I want

Filter(Accounts,industrycode = Blank())

However if I add an If() statement to it determine which value the user selected from the radio, I get an error that says the '=' symbol is an invalid argument type.

Filter(Accounts,industrycode = If("All" in radio_cust_type.Selected.Value,Blank()))

EDIT: When I want to check for a "School", I use a filter like:

Filter(Accounts,industrycode=If("School" in radio_cust_type.Selected.Value,34)) 

I intend to combine the two filters later but right now I want to check for blanks

4

1 回答 1

1

This should work:

If(
radio_cust_type.Selected.Value="All", Filter(Accounts, industrycode = Blank()),
radio_cust_type.Selected.Value="School", Filter(Accounts, industrycode = 34),
radio_cust_type.Selected.Value="Business", Filter(Accounts, industrycode = XX)
)

Where XX is the industry code for "Business"

于 2017-11-08T12:11:18.083 回答