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

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: [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

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

By nmsinc - October 13, 2011 - edited: October 13, 2011

Thanks Jerry,

That worked with a little tweeking!
nmsinc