List field no looking up details

5 posts by 3 authors in: Forums > CMS Builder
Last Post: September 28, 2013   (RSS)

By pault - September 26, 2013

I have a list field which is set up to 'Get options from database (advanced)'.

I've then selected a table name and the field for options values is set to 'num' and the field for option labels is a descriptive field.

This seems to work for a number of the records but doesn't include all of them, only the first 1000 as far as I can tell.

Is there a way around this? 

Thanks, Paul.

By Jason - September 26, 2013

Hi Paul,

1000 records in a list field is a maximum that is set in the CMS code.  It is possible to customize the code to remove this restraint, but it is definitely not recommended.  The best solution would be to look for ways to minimize the number of records that would need to appear in the list, as a list of 1000 or more is difficult to use or manage.

There are a few ways to minimize this list depending on the type of list you are using.  For example, say you have a list of 1500 products that you want in a list and each product has a category.  You can create a category list field first.  Selecting a category from that list can trigger an update in the product list to only show products of the selected category.

Does it sound like something like this would work for you?

Please let me know if you have any other questions.

Thanks!

---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Hi Paul,

There is a way to get around the 1000 limit issue without having to update any of the CMS Builder code. If you go to edit your section, and then edit the list field. Then change the list options option to Get options from MySQL query (advanced). Then you just need to change the provided mysql call text in the text area to use the variables you were using before. 

The Get options from MySQL query (advanced) doesn't have any limit on the number of records it retrieves.

Let me know if you have any questions.

Cheers

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By pault - September 28, 2013

Thanks Greg, that works perfectly.

Regards, Paul.