In search mode how link two select fields

Hi,
In advanced or dynamic search I’ve two select fields, the second includes a reference to the first one in its where clause
In a form I use to do this, but in a search doesn’t works

how can I do?

thanks in advance