I have a filter that lists the same item multiple time. I would like to have each item show once without coding.
Hmm. I’ll try again.
First: Your States Filter.
The filter source here is tied to your primary model.
- This means that each row in the model will be a row in the filter’s drop down box (or available to type ahead).
- This also means that if values are repeated in that model, they will be repeated in the drop down box.
When you apply the search “whita” that primary model is requeried and the list grows much smaller.
- Now this shortened list is what is available in the filter’s drop down box.
- The shortened list means the filter will show as a drop down box, instead of the type ahead. The number of values in the list is now less than the threshold you specified for the filter.
Incidentally, this also means that the “show all” value in the drop down is not really doing that. It does not reset the “whita” value you typed into the search box.
Second: Your Cities Filter. (** I think this is the way you want to go)
The filter source here is tied to an aggregate model with one line for each city.
- This means that the drop down will only show each city once.
When you apply the search “whita” to the primary model, the second aggregate model is not re-queried. So you always get the same longer list of cities you started with, and the control does not change from a type ahead to a piclist. (This seems like better user experience to me).
There is not a way to have the search box values on the primary model apply to the second aggregate model.
As I said before - these are the options you have.
Thanks Rob. I did screen shots the other day before I started working on adding a filter on states. I did not check my screen shots and right side of the filter screen shot was cut off. I could not find the version you had fixed. Can you again look I what I have entered wrong. I agree, it is the second filter referenced above that works best.
I have opened up my account
https://www.youtube.com/watch?v=WkwAaDcm-hk
Again it was “D_View_Member_DNA” the city filter.
When I go to add the same filter to state, do I create another model like “CityGrouping” called “StateGrouping”?
You need to put the Alias from the aggregate modle grouping field into the two template fields on the filter Source properties.
And yes, for state, counties, subdivisions etc… Each will need its own aggregate model.
Thanks Rob.
I am able to type “Apopka” in the city filed, select Apopka but the list is empty.
https://www.youtube.com/watch?v=ijMifqws7Ic
When I go to https://dorothy–skuid.na16.visual.force.com/apex/UI?page=D_View_Member_DNA
I get the following error.
I believe there is a mismatch between the field you are using in your filter source (city name field) and the field you are using in your condition (city ID field).
Thanks
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.