Question
I'm doing a formfield search to generate a dropdown list of all the possible value of this field, but where a field value occurs on multiple topics, I'm getting multiple hits returned by the search and therefore it appears multiple times in my dropdown list.
Is there a way to ensure the dropdown only contains a single instance of each value, regardless of how many times it occurs?
Here is the search I'm using:
<form action="%SCRIPTPATH{view}%/%WEB%/%TOPIC%" method="get">
<select name="fieldvalue">
<option>Select fieldvalue...</option>
%SEARCH{ "[F]ield.*value\=.[A-Z].*" web="Foo" type="regex" nosearch="on" nototal="on" format="<option>$formfield(field) </option>" order="formfield(field)"}%
</select>
<input type="submit" value="Go" />
</form>
Thanks
Environment
--
TamsinTweddell - 18 Apr 2008
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
With the
SpreadSheetPlugin, you could try putting the search results into a list and then use the LISTUNIQUE function.
--
SeanCMorgan - 22 Apr 2008
Closing this question after more than 30 days of inactivity. Feel free to re-open if needed.
--
PeterThoeny - 03 Jun 2008