About data type = 'select'

We have a field with data type set as ‘SELECT’ then search lookup -> lookup method = ‘Automatic’ with SQL Select Statement “Select userid, username from users order by userid”.

When we launch the grid, it shown the first userid.

My question is, how to make it shown BLANK in-state of the first userid. Because in search / filter, the search for userid is OPTIONAL?

Any idea?

Regards,
CK

Re: About data type = ‘select’

If you do not have a matching value, then it should be blank.

Change your select statement to match only the required record. There is no need to load all user records for a single grid record.

select
userid,username
from users
where iduser = ‘{iduser}’

Regards,
Scott.

Re: About data type = ‘select’

Actually this is mainly for management usage. Not for all other users.

Coz in search field, If I don’t want to filter user id, just leave it BLANK. but if I want to view specific userid, then I can choose for the LIST.

The other option is, let user enter the code. No select allowed.

Regards,
CK

Re: About data type = ‘select’

In the grid lookup, you would enter the SQL I provided to list only matching userid in the grid. In the search SQL (search lookup), you would then enter the SQL you provided but also set ‘Display Title’ to yes and enter a title of ‘Select User’ (or leave it blank) and it will behave correctly in both instances.

If this is not what you are looking for, can you provide more detail on the setup of your app.

Regards,
Scott