[ic] Group By

Barbara Picci interchange-users@icdevgroup.org
Mon Sep 23 14:14:51 2002


Hi list,
I have a problem with the search.
I red all the documentation but I can't find a solution for this problem.
In the products database there is a field tha thas the same content 
for more records (for istance. colour for T-shirt).
In the result I need that this content is written once,
instead of for every time that ic find a product with that content.
My code is:

<FORM ACTION="[area search]"  method="post">
<INPUT TYPE=hidden NAME=mv_search_page VALUE=results1>
<INPUT TYPE=hidden NAME=mv_matchlimit VALUE="10">
<INPUT TYPE=hidden NAME=mv_search_map VALUE="
                         mv_searchspec=search1
                         mv_searchspec=search2
                         ">
<INPUT TYPE="hidden" NAME="mv_search_field" VALUE="color">
<INPUT TYPE="hidden" NAME="mv_search_field" VALUE="owner">
<INPUT TYPE=hidden NAME=mv_coordinate VALUE="yes">

<select name="search1">
[search-list]
<option value="[item-field color]">[item-change 1]
[condition][item-field color][/condition][item-field color][/item-change 1]
</option>
[/search-list]
</select>

<select name="search2">
[search-list]
<option value="[item-field owner]">[item-change 1]
[condition][item-field owner][/condition][item-field owner][/item-change 1]
</option>
[/search-list]
</select>
</form>

The result is a select with some options empty that have a value.
I have tried to put [item-change 1] before <option value="[item-field color]">
but it generates an error.
How can I visualize only the records without repeat them?
A sort of sql "group by"?
Is there an option that groups by and that i can use in the form of 
the previous page?
Can anyone help me?

Excuse me for the bad english.
Thanks in advance.
-- 
Barbara Picci
Micro srl
viale Marconi 222, 19131 Cagliari
tel. 070400240