I got absorbed into the post with the things Hugh was talking about as it sound like a good idea.
Well the filter thing may be considered a little hacky, I've removed it with PHP but I've seen it done with JavaScript once on a post on the Stackoverflow website.
The following is the How To, but Hugh would be the better judge on improvements or advise on how hacky it is.
So as previous mentioned I did this with a dropdown element, but you can probably do the same with a dbjoin.
For my example I used values 0, 1 and 2 for Core, Union and Non Union.
I added a PHP plugin to the form with the following code.
PHP:
// Gets the status of the dropdown, either 0, 1 or 2
$status = "{z_status___status_raw}";
// If entered as 'Core' then add him as a Union and Non Union as well so it pops up in the filters.
if ($status =='0') {
$formModel->updateFormData('z_status___status', '["0","1","2"]', true);
Replace
z_status___status_raw with your full element name, the first entry needs _raw at the end.
For the list view you can use the following optional code. This stops the duplicate entries for a Core member, i.e he is shown as Core instead of Core, Union and Non Union.
Use a custom list template or just duplicate Bootstrap and call it something else.
In default.php
Just after the foreach loop
PHP:
foreach ($group as $this->_row) :
and before the load template
PHP:
echo $this->loadTemplate('row');
Enter the following
PHP:
// Filters 'Core' entry to only show 'Core'
// Otherwise each 'Core' entry will show as 'Core', 'Union' and 'Non Union'
if (strpos($this->_row->data->z_status___status,'Core') !== false) {
$this->_row->data->z_status___status = 'Core';
}
Replace
z_status___status with your full element name.
Finally for the filter hack.
Just before the line that starts with
PHP:
$filter_count = array_key_exists
Enter the following
PHP:
$this->filters['z_status___status']->element = str_replace('<option value="0">Core</option>', '', $this->filters['z_status___status'']->element);
Replace
z_status___status with your full element name.
This is basically looking for the
entry and replacing it with nothing.
One important thing though is too check everything is 100% before you use it live. Otherwise you will have to edit entries to get them applied correctly.