Help With List And Sorting

6 posts by 2 authors in: Forums > CMS Builder
Last Post: June 25, 2013   (RSS)

By nmsinc - June 22, 2013

I am using the display option within CMS: checkboxes (multi value) and I’m having some problems coding a list/sort in the bold area below.

I need to sort by two fields:

  1. ‘accepts_clearing_house_claims`
  2. `remove_this_clearing_house`

<select name="independent_company_name" onchange = "populateAdjusterList(this, 'independent');"  // populate list code in j >

<option value="">All</option>

<?php echo join(', ', $member_companiesRecord['remove_this_clearing_house:values']); ?>

<?php foreach (mysql_select('member_companies', "member_type = 'Independent' ORDER BY member_company_name") as $independent): ?>

 <?php if ($independent['accepts_clearing_house_claims']): ?>

<option value = "<?php echo $independent['num'];?>"><?php echo $independent['member_company_name'];?> - <?php echo $independent['city'];?> <?php echo $independent['state'];?></option>

<?php endif; ?>

<?php endforeach ?>

</select>

I want to list only those that have not been checked – any ideas welcomed!

Regards

NMSINC

nmsinc

By Jason - June 24, 2013

Hi,

I'm a little unclear as what you are trying to display.  Currently, you are selecting all member_companies with a member_type of "Independent" and then putting a value into the drop down if they have a value in the accepts_clearing_house_claims field.  Can you please let me know how you want this to work differently than it currently is?  How should the remove_this_clearing_house field apply?

Let me know and we'll see if we can work out a solution.

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 nmsinc - June 24, 2013

Hi Jason,

The CMS viewer code would be: <?php echo join(', ', $record['remove_this_clearing_house:values']); ?> which would list only items in the list that have been checked . I need this same type of filter applied to the "if" statement and I do not have any idea as to how this can be done!

Thanks

NMSINC

nmsinc

By Jason - June 25, 2013

Hi,

Thanks for the additional details.  Just want to make sure I'm on the same page when it comes to what you are looking for.

As I understand it, you want to populate a drop down with options from the accepts_clearing_house_claims field, but only those options that have been selected in at least 1 record from member_companies where member_type is Independent.

Does that sound right?  Let me know and we'll get it sorted.

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 nmsinc - June 25, 2013

That's correct!

Thanks

NMSINC

nmsinc