Re: [nmsinc] Problem with List Options in CMS

7 posts by 1 authors in: Forums > CMS Builder
Last Post: December 20, 2011   (RSS)

By Jason - December 9, 2011

Hi,

Try using this query for agent (example)

SELECT num, fullname
FROM `<?php echo $TABLE_PREFIX ?>accounts`
WHERE assigned_company = '<?php echo $ESCAPED_FILTER_VALUE;?>' AND user_type = 'agent'


Then under "Advanced Filter" select the name of the company field for this section.

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/

By Jason - December 9, 2011

Hi,

Could you post the exact query you used for the assigned_adjuster field.

Also note that the variable assigned_company needs to be the name of the field in the accounts table, not in the section your in.

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/

By Jason - December 12, 2011

Hi,

I think problem is that the query in the second post was using the field "assigned_company", instead of "company_type".

Try this:

SELECT num, fullname
FROM `<?php echo $TABLE_PREFIX ?>accounts`
WHERE company_type = '<?php echo $ESCAPED_FILTER_VALUE;?>' AND user_type = 'dispatcher'


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/

By Jason - December 16, 2011

Hi,

Try removing "num" from the end of <?php echo $ESCAPED_FILTER_VALUE ?>

<?php if ($CURRENT_USER['isAdmin']):?>
SELECT num, fullname
FROM `<?php echo $TABLE_PREFIX ?>accounts`
WHERE "member_company" = '<?php echo $ESCAPED_FILTER_VALUE ?>' AND user_type = 'Adjuster'


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/

By Jason - December 19, 2011

Hi,

So for some reason, no records are being returned by our query. Are you sure all the values match up? For example, does user_type store the value "Adjuster" or "adjuster".

Let me know.
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/

By Jason - December 20, 2011

Hi,

When you're using one field to affect the values populated in another field, those values are retrieved dynamically through a jquery call. The problem here is that for some reason, the query in your second field is not returning any values.

If you could fill out a [url http://www.interactivetools.com/support]2nd Level Support Request[/url], I'll take a quick look and let you know if I see the problem.

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/