Exclusion of records listed based upon felid choice

5 posts by 2 authors in: Forums > CMS Builder
Last Post: October 13, 2011   (RSS)

By nmsinc - October 12, 2011

I have a drop down field labled 'claim_status' with four choices. I need a quick set of code (not a seach utility) that will prevent any one or multipal choices from being listed on a listing page!

Thanks

nmsinc
nmsinc

Re: [nmsinc] Exclusion of records listed based upon felid choice

By gkornbluth - October 12, 2011

H nmsiinc,

What would you like to trigger this action with?

A check box in the user account record?

Are you using the membership plugin?

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Exclusion of records listed based upon felid choice

By nmsinc - October 12, 2011

I have a listing page that lists four types of status submissions:[/#000000]
  1. Received[/#000000]
  2. In Route[/#000000]
  3. Working[/#000000]
  4. Finished [/#000000]


[/#000000]

These types are selected from a record submitted by a user. The admin dispatches and updates the record accordingly by selecting the current status for the drop down on the record-posting page. I have a listing page that lists all records entered and [/#000000]I need to exclude all records marked ‘Finished’ from the listing page![/#000000]

[/#000000]

Hope this helps?[/#000000]
nmsinc

Re: [nmsinc] Exclusion of records listed based upon felid choice

By gkornbluth - October 12, 2011 - edited: October 13, 2011

It does help, I think.

I'm not sure how

One approach would be to use a simple if statement as a criteria screen.

Something like:

<?php foreach ($your_tableRecords as $record): ?>
<?php if (!$record['your_field'] == "Finished"): ?> ...your code...
<?php endif ?>
<?php endforeach; ?>

Or

<?php foreach ($your_tableRecords as $record): ?>
<?php if ($record['your_field'] == "Received"): ?> ...your code for action 1...
<?php elseif ($record['your_field'] == "In Route"): ?>...your code for action 2...
<?php elseif ($record['your_field'] == "Working"): ?>...your code for action 3...
<?php else: ?> ...your code for action 4...
<?php endif ?>
<?php endforeach; ?>

If that doesn't quite fit the bill, there's a lot more on If statements in my CMSB cookbook at http://www.thecmsbcookbook.com

Hope that helps sort things out.

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php