Bug in v2.14

8 posts by 3 authors in: Forums > CMS Builder
Last Post: March 2, 2012   (RSS)

By nmsinc - February 6, 2012

I'm working a new web site using v2.14 and have a problem with using the "List Options sql query (advanced)" option when populating two field list options with the same field refresh - using the code below in v2.13 it works perfect - in v2.14 the first field continues the load process for ever while the second loads perfect. I also tested the load by moving field two up to one using DragOderSort and received the same results!

See code below:

First Field: Load only Dispatcher or Dispatcher/Deputy/Officer

SELECT num, fullname FROM `<?php echo $TABLE_PREFIX ?>accounts` WHERE `agency` = '<?php echo $ESCAPED_FILTER_VALUE ?>' AND user_type IN('Dispatcher', 'Dispatcher/Deputy/Officer')

Second Field: Load only Deputy/Officer or Dispatcher/Deputy/Officer

SELECT num, fullname FROM `<?php echo $TABLE_PREFIX ?>accounts` WHERE `agency` = '<?php echo $ESCAPED_FILTER_VALUE ?>' AND user_type IN('Deputy/Officer', 'Dispatcher/Deputy/Officer')

Any help? Thanks - nmsinc
nmsinc

Re: [nmsinc] Bug in v2.14

By (Deleted User) - February 7, 2012

Hi nmsinc,

Which fields are populated with these queries? I'll run a check on our local version and see what I can find.

Thanks,

Tom

Re: [Tom P] Bug in v2.14

By nmsinc - February 7, 2012

Hi Tom,

This is a new site (not the one you and I have been working on lately) although the same format. Send me a quick email and I will provide CMS address!

Thanks - nmsinc
nmsinc

Re: [nmsinc] Bug in v2.14

By (Deleted User) - February 7, 2012

Hi all,

This is just an update to explain what nmsinc found:

When setting a pulldown field to use values generated by an sql query that update dependent on another field in that view, the values were not being returned by the query or the query would not complete (and you would always see the 'loading...' placeholder).

Here's a bit about what advanced pulldowns are good for:

Advanced pulldowns are a great way to add features to CMSB records and, when coupled with the right SQL, can help make a lot of tasks a lot easier.

Using the 'update on change' option means that when the selected field is updated (the field on which we are waiting for information), an Ajax request is sent to re-populate the dependent field(s) with the appropriately filtered/retrieved values.

So, if you have three tables (say accounts - individuals with their contact info and a field called Company which populates from the Companies table, Companies - all the details of a company, Payments - which has a field Company that populates from the Company table and Users which uses an advanced sql query to populate).

You want the Payments view to allow you to choose a 'Company' and then a user from that company. Set the 'Users' field to be an advanced pulldown using a MySQL query, set the update on change field to 'Company'. When the 'create' form is opened, there will initially be no options in the 'Users' pulldown but, once 'Company' is selected, all users who are from that 'Company' will be displayed as options in the pulldown.

Tom

Re: [Tom P] Bug in v2.14

By (Deleted User) - February 8, 2012

Hi All,

The problem was solved!

It required a minor change to the Ajax that runs the advanced pulldown query which will be rolled out in the next release.

Tom

Re: [Tom P] Bug in v2.14

By nmsinc - February 29, 2012

I ran into this issue again on an upgrade with another customer to 2.14 - can you let me know what corrections you made?

Thanks - nmsinc
nmsinc

Re: [Jason] Bug in v2.14

By nmsinc - March 2, 2012

Thanks for the update and help - have a great weekend!

nmsinc
nmsinc