This topic is locked
[SOLVED]

 Customise list of values in lookup wizard

11/26/2009 6:39:15 AM
PHPRunner General questions
M
Mahesh author

I would like to use the Lookup Wizard to show a list of values and use it in a similar way to how MS Access operates.
E.g. list would show the following options:
'1: All my life'

'2: less than a year'

'3: 1-5 years'

'4: 6-10 years'

Etc
So if a user selects the option "2: less than a year", I just want the code "2" entered in to the database and not the full text "2: less than a year".

Anyone know how to do this?

J
Jane 11/26/2009

Hi,
unfortunately it's impossible to create this type of dropdown using List of values option.

You can create new table in the database with two fields (id, textvalue for example), then use Lookup table option on the "Edit as" settings dialog.

M
Mahesh author 11/30/2009



Hi,
unfortunately it's impossible to create this type of dropdown using List of values option.

You can create new table in the database with two fields (id, textvalue for example), then use Lookup table option on the "Edit as" settings dialog.


I found a way by using the BeforeAdd event. I created a List box with the values

01 Male

02 Female

99 Did not answer
and then used Substr to extract 1st 2 digits and then replace the $values["xxx"] field.

Thanks for your help.