This topic is locked
[SOLVED]

 List of Values for a lookup field

10/25/2019 9:14:10 AM
PHPRunner General questions
B
bcritchley author

Is there a method that I can have a predefined value list, but also allow the users to add to it on the fly similar to the Database Table option?

N
Nir Frumer 10/25/2019

hi

if you don't trust the browser autocomplete
I would create a table with a primary key column for your value

and use this table as a lookup with "allow free input"
in the after record added and after record updated

I would insert some code like this.

insert into my table (column) values (yourValue) on duplicate update
(this is mysql code, other solution may involve a previews query to check if the value already exists)
hope it helps,

B
bcritchley author 10/25/2019



hi

if you don't trust the browser autocomplete
I would create a table with a primary key column for your value

and use this table as a lookup with "allow free input"
in the after record added and after record updated

I would insert some code like this.

insert into my table (column) values (yourValue) on duplicate update
(this is mysql code, other solution may involve a previews query to check if the value already exists)
hope it helps,


Thank you for the suggestion, definitely a good starting point.