Dynamic field with Select property

Hi all.
I have a form with a Field “X” using SELECT to show a list box. This SELECT depends of other Field “Y” using Lookup property. It?s Ok.
But, I need to change this Field to pretend this:

  1. If the field “Y” have an specific data “W”, then the SELECT to Field “X” just take one unique related data.
  2. If the field “Y” have a data different to “W”, then the SELECT to Field “X” for lookup retrieve all the data without restrictions.

How can I do that ?
Thanks a lot
JG

Re: Dynamic field with Select property

Use UNION in your select on field X, in pseudo code:

Select *
from table
where fieldY = ‘value’
and … -> make sure it returns 1 row
Union
Select *
from table
where fieldY != ‘value’ -> returns more than 1 rows

Depending on the value of fieldY, the first or the second Query will give you output.

Re: Dynamic field with Select property

Thanks a lot, Freezer. It?s solved now.
JG