[ic] Implementation of a new search type

bas.bezemer at wxs.nl bas.bezemer at wxs.nl
Fri Feb 27 08:29:17 EST 2004

Hi Michael,

Van: "Dr. Michael Streubel" <Michael.Streubel at palmwaregroup.com>
> Hi Interchangers,
> in my store, I want some of the categories in the category menu
> to retrieve its data not from the database but from a remote server
> via a web service. So I implemented a new search type which
> is working fine as far as the data search is concerned. All data
> structures are well defined and well set as far as I can see.
> Now consider the following test loop:
> [loop  search="
> bs=1
> em=1
> su=1
> ml=2
> fi=products_test
> st=.... new search_type ....
> tf=categoryid
> sf=categoryid
> se=189461
> "]
> [loop-code]
> [loop-field title]
> [/loop]
> As mentioned, the search works successfully. However, when
> it comes to iteration, the system still tries to use
> the database instead of retrieving information 
> (in order to determine values of [loop-code],[loop-field title])
> from the in-memory data.
> How can I teach IC to not touch the database in this case ?
> (BTW, I still need and use a searchfile (fi) to get attribute names
> for my data structures. But I don't think that's the cause
> of the problem).

The [loop-field title] causes the database to be called. It is a direct
query. In a normal search (not your search) you can access "In Memory"
variables by the tags:
[loop-param name_of_your_variable] or by [loop-pos 0] , [loop-pos 1],
[loop-pos 2] etc.

The "name_of_your_variable" and positions 0, 1, 2 refer to fields in the
search definition  given by "rf" or "mv_return_fields". It needs
something like:


More information about the interchange-users mailing list