SPFilterDropDown using just text for the filter

Oct 3, 2014 at 7:02 PM
Hi there

Is there a way to use SPFilterDropDown without using the source dropdown. For example, if I want to filter a dropdown containing RP1, RP1, RP2, RP3 and return the two RP1 items as the filter but without getting the RP1 expression from anoher dropdown? So RP1 would be a straight text variable say.

Not sure if that makes sense.
Coordinator
Oct 3, 2014 at 8:32 PM
Des:

What criteria would you want to use for the filter? If the column is a lookup column, then you can filter based on any characteristics of the items in the underlying list.

M.
Oct 3, 2014 at 8:54 PM
Hi Mark

Instead of taking the filter key from another lookup column I want to take it from a value in a simple text column in the same record. So once the form is loaded, the single drop down on the form will be filtered on the basis of a value such as RP1 in a text column called say, RPCODE.

The value of this text field is a key (column) in the underlying list associated with the drop down list (lookup column)

Hope that clarifies
Coordinator
Oct 3, 2014 at 9:05 PM
I'm not totally sure I get it, but it sounds like a specific case for your own logic. You could clone some of the existing SPServices code or just hack something specific together.

However, the RPCODE value must have some relationship to the dropdown values or else you'll just be hacking. If you store that relationship in the lookup list, then it'll work better anyway.

M.