Hi,
I have a simple program where we have a list of records with columns like employees, DOB, city, country, phone number. To filter this data on the basis of country or phone or city, i have created a combobox to select the search field and a text box to enter the search text. E.g. Combox has 3 values - Country, City and Phone. If i select city and enter search text as "New York", the recordlist should list all employees whose belon to the city "New York". The following code is not getting accepted as a filter condition. It says it "Invalid use of 'Boolean' in Filter.
If(varFilterCombo=1, Employees.Country like "%" + varSearchText + "%",
If(varFilterCombo=2, Employees.City like "%" + varSearchText + "%",
Employees.Phone like "%" + varSearchText + "%"))
Also, if i remove the if condition and only use one condition, it works fine. E.g. Employees.Country like "%" + varSearchText + "%"
Please let me know how to use the if condition in the aggregate filter.
I have a simple program where we have a list of records with columns like employees, DOB, city, country, phone number. To filter this data on the basis of country or phone or city, i have created a combobox to select the search field and a text box to enter the search text. E.g. Combox has 3 values - Country, City and Phone. If i select city and enter search text as "New York", the recordlist should list all employees whose belon to the city "New York". The following code is not getting accepted as a filter condition. It says it "Invalid use of 'Boolean' in Filter.
If(varFilterCombo=1, Employees.Country like "%" + varSearchText + "%",
If(varFilterCombo=2, Employees.City like "%" + varSearchText + "%",
Employees.Phone like "%" + varSearchText + "%"))
Also, if i remove the if condition and only use one condition, it works fine. E.g. Employees.Country like "%" + varSearchText + "%"
Please let me know how to use the if condition in the aggregate filter.