Collection listbox highlighting

I have a collection/entity listbox where “ents” is the collection and “entSel” is the collection of highlighted records. A function “myFind” returns a collection.
I’d like to highlight the lines in the listbox returned by entSel:=myFind(ents) the way Query puts its results into the highlight set of a selection based listbox.

Should entSel:=myFind(ents) do this already, is there a command, or should this be a feature request?

Thanks,

This works, but I’ll bet that a built in 4D feature would be more efficient, especially when the found list gets large or approaches the size of the searched list.

LISTBOX SELECT ROW(;“valsBox”;0;lk remove from selection)
For ($i;0;entSel.length-1)
$pos:=ents.indexOf(entSel[$i])
If ($pos#-1)
LISTBOX SELECT ROW(
;“valsBox”;$pos+1;lk add to selection)
End if
End for

: Keith CULOTTA

but I’ll bet that a built in 4D feature would be more efficient,
especially when the found list gets large or approaches the size of
the searched list.

True. (I don’t expect a visible difference single user, but huge in Client/Server). And yes, feature request already in backlog…