Hi,
The drop down list gets populated using a rule. You can configure a rule that checks if there is a value selected in a different control (i.e. drop down list) then use the selected value to filter the data returned, Otherwise populate the dropdown list with no filters as show in the screenshot below.
Hi Mohamed,
Thanks for your response. I appreciate you taking the time to answer my question.
I think perhaps I have not been very clear in what I am asking. Here is my form:
The left hand column contains 3 drop-down lists – the Filters. These are not cascading; their values are completely independent of each other.
The right hand column contains a list view (shown with no records) at the top, and an item view at the bottom (which is not relevant to my question).
The list view should return all records when there are no selections made in any drop-down. But a selection in the Region Filter should return only the records in the list which match that region. The individual selections in each drop-down are cumulative – one doesn’t cancel the others, they must be applied if they are specified, in conjunction with each other.
To describe what I am trying to achieve, if I had only one drop-down, for example, the “Filter By Region” drop-down list, I could easily configure a rule so that when the drop-down changes, if it contains a value, then pass that value to the smart object and refresh the list view to apply a filter, and if the drop-down was empty, refresh the list without passing any values to clear the filter.
That rule becomes complicated if I have more than one drop-down, and they have to take each other into account.
In words, the rule behind each drop-down would be “when the drop-down list is changed, pass the selected values in all of the drop-downs to the smart object behind the list view, and then refresh the list. For any drop down list where there is no selection, pass a wild card to that property rather than an emtpy value, so that no filtering is done on that field”.
If I can’t pass a wildcard, then I have to have different list-refresh rules for every possible combination of value/no value drop-downs, basically if/then statements with 7 possible “ifs” – a solution that doesn’t scale if I later want to add another drop down filter.
The question is, can you pass a wild card to a smart object property, so that the rule behind each drop down can pass an "allow all" into the smart object for any drop down that is empty? If I can’t, then does anyone have any suggestions on how to achieve what I am trying to do?
Thanks,
Vaughan
Post edited to remove my poor choice of words "one rule".
Hi Vaughan, the only approach I could think of right now, is to create a rule for every possible outcome
drop down list 1
drop down list 2
drop down list 3
drop down list 1-2
drop down list 1-3
drop down list 2-3
drop down list 1-2-3
one more idea, if you're using SQL server as a backend I would builld a stored procedure to manage this. and call the stored procedure to populate the listview
Hi Mohamed,
Thanks again for your response. The rule for every possible outcome becomes difficult to manage if the users decide to change one of the filter fields or add a new one. 4 dropdowns becomes 15 possible combinations that include a no-value.
I am using SQL and didn't think of approaching it in that way, that will definitely allow me to do what I require.
Thanks for the suggestion.
Vaughan