Weird problem with dependent list fields

5 posts by 2 authors in: Forums > CMS Builder
Last Post: April 19, 2012   (RSS)

Within the admin area of CMS, I'm having a weird problem with dependent list fields in one of my sections (CMSB 2.14).

I have one field - called Chapter - which is a list field that get's its values from another table, the Chapter table. It is defined as advanced sql query list field with this sql:

SELECT num, CONCAT(name," - ",day," - ",location)
FROM `<?php echo $TABLE_PREFIX ?>chapters`

The next field is called Meeting and it's defined as an advanced sql query list that gets its list info from the Meeting table - within the meeting table, there is a chapter field, so the sql is defined as:

SELECT num, date
FROM `<?php echo $TABLE_PREFIX ?>meetings` WHERE chapter='<?php echo $ESCAPED_FILTER_VALUE ?>'

And the advanced filter is set to "chapter"

There is a third field, called Member which is also dependent on the chapter field and it is defined as an advanced sql table with the following sql:

SELECT num, CONCAT(MemberFirstName," ",MemberLastName," - ",MemberCompany) FROM `<?php echo $TABLE_PREFIX ?>members` WHERE MemberGroup='<?php echo $ESCAPED_FILTER_VALUE ?>'

with filter field set to chapter (the MemberGroup field in the members table actually contains the num value of one of the chapter records from the Chapters table.

Here's the weird part...if I have just meeting defined as advanced sql, and filter of chapter, it works fine. If I have just the member field defined as advanced sql and filter of chapter, it works fine, but when I have them both defined this way, the meeting field goes to "Loading..." upon changing the chapter and it stays this way and the member field first loads up the records that should be in Meeting, then subsequently loads up the member records. It's something you'd have to see real-time as it happens - it's pretty bizarre.

My guess is there's some small glitch with this capability.

I've attached one screen shot to show the end result
Attachments:

4-19-2012-10-10-28-am.png 35K

Re: [garyhoffmann] Weird problem with dependent list fields

By Jason - April 19, 2012

Hi,

You're right, this is a bug in the CMS that we've only just recently run into. There is a fix in place for the next version of CMS Builder (2.15). The fix is currently out in the Beta Version. If you like, you can sign up as a beta tester and upgrade your CMS to the 2.15 beta. That should take care of this problem. Here is some more information about the beta:
http://www.interactivetools.com/forum/gforum.cgi?post=92938#92938

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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

Re: [Jason] Weird problem with dependent list fields

Since this is for a production site, I'd prefer not to use beta software on it.

Any ability to give me a diffs listing or at least a pointer in the right direction that would fix it for 2.14?

Re: [Jason] Weird problem with dependent list fields

Thank you - just an FYI - I needed to uncomment the async: false to get it to work correctly. Otherwise, the results were identical.

Thanks again.
Gary.