List Manager Forum

Link to other list or view

User moon_1100 2013-06-07 15:07:10

Hi Support,

Not sure if I have missed something but I want to create a main list and then a staff list. When adding a record in the main list I have a field titled staff name which is linked to the staff list and should allow the user to select the staff name from the available staff members in the staff list. I have successfully done this using SQL to other tables on my site but am not sure how to do it within list manager. I know I can set the field type to "Link to other list or view" but can not find any documentation in either the manual or this forum on how to use it... Some basic instructions would be greatly appreciated.

Moonsoft support 2013-06-07 17:17:31

Hi,
the link to other list field type is intended to create a html link to navigate to another table created with list manager, you can find information about this feature at the quick guide (Adding Fields->Type):

http://www.moonsoft.es/images/pdf/lm_quick_guide.pdf

but this is not what you need to get an option field to be filled with other list data. For your case you should use another sql query, based on your first list.

SELECT value as key,value FROM yourprefix_listmanager_values where idfield=x;


Replacing 'yourprefix' for your db prefix, and 'x' for the field id you want to show as the options from your referenced table. You can check each field id as the first non-editable intput at fields configuration.

Hope this helps, regards

...
Support/development

Perfect for small code changes or to correct any bug at your site

Buy now!
...
CalcBuilder

Create dynamic calculators

Buy now!