Home → Resources → Articles

No Items Exist In The List When Defining Custom Data Lists In Content

(Ektron CMS 400.Net,JavaScript) by Jason Skowronek on 09/27/2011

The Ektron knowledgebase contains an article, How To Define Data Lists In Content using smart forms and structured content. These content based lists can be used on smart form templates, html forms, or anywhere else you need structured lists.

When attempting to implement this custom logic, you may run into the following message/error in the "Item List" section of the Choices Field editor form:

No items exist in the list.

The problem lies in the /workarea/contentdesigner/choicesfield.js file. On line 750 (or so), is a hard-coded URL to the DataListSpec.xml file. Unfortunately, most browsers will cache xml files indefinitely or until the cache is forcefully cleared. Any updates made to the local version will not get loaded. So, new list source names will appear in List (source) drop down list, but the data items will not load properly.

A reasonably quick fix is to append a timestamp variable to the URL, forcing the browser to load the non-cached version:

var strDatalistUrl = "/WorkArea/ContentDesigner/DataListSpec.xml?ts=" + new Date().getMilliseconds(); // would be nice if not hardcoded

Hopefully this helps someone that runs into the same issue I was having.

Code on!

Comments (2)

Dan

12/16/2011 6:11:20 PM
Thanks!

Jason

4/18/2012 12:58:22 AM
You are welcome.
Leave a comment
Name *
Email *
Homepage
Comment

Recommend

System Mechanic 

Nero Sale 150x150 

SkoNet provides comprehensive digital consulting services such as: web development, applications development, database design and architecture, business process management, customer relationship management, and many others that help businesses of every size, industry, and geography meet the complex challenge of managing and sharing information on the web. Our skills and expertise in online systems allow us to help customers build applications ranging from simple, single-page web sites to robust enterprise systems.

Online Backup, Ektron Consulting, Ektron Programmer, Ektron Developer, Ektron Partner Utah, Ektron Partner, Ektron Architect, Ektron Hosting, Salesforce.com Consultant Utah, Salesforce.com Partner Utah, Salesforce.com Partner, Salesforce.com Programmer, Salesforce.com Architect, Salesforce.com APEX Programmer