GetAllEntriesByKey and Categories

Hi all,

Is there a problem with using GetAllEntriesByKey if your first two columns are Categorized?

I have a view that has the first two columns categorized… then the 3rd column is not sorted… then the 4th column is sorted.

Now, what i want to do is get ALL entries where the 4th column is “Apple” (which in the view would have 25 entries).

my code is as follows:


dim searchkey(2) as string

searchkey(0)=“”

searchkey(1)=“”

searchkey(2)=“Apple”

Set vc = view.GetAllEntriesByKey(searchkey, False)


but this returns only ONE entry!?!?!?

all my columns are of text value too.

is there something wrong? did I miss something here?

Please help… thanks in advance!

SH

Subject: I think you’ll have to build an additional view

I think the problem may be that you’re leaving the first two values blank. If you only want entries where the column value is ‘apple’ here’s what I would suggest:

Make a new view, where the ‘apple’ column is your first column (sorted or categorized).

This should make your getAllEntriesByKey programming a lot easier since you won’t even need to use an array – you can just pass in the key value as a string.

Subject: RE: I think you’ll have to build an additional view

Thanks William,

I was trying to avoid creating a new view… but I guess that’s my only option.

SH