I have a module outside of Fabrik that gets the value of a filter or URL parameter and uses it to display some related information about the record. This one module works on multiple lists, which is why there are so many if else statements. The code I'm using to get the value is below. It's actually working very well, however when I try to order any column, I lose the ID in the module and get "ID not detected". Is there a way to maintain/add a URL parameter when ordering? Or some other way to get the value of the filter? The filter is still active on the correct item, but for some reason FabrikHelperElement::filterValue doesn't have a value when you order a column. Appreciate any input, Thanks.
PHP:
$db =& JFactory::getDBO();
$ad_filter = FabrikHelperElement::filterValue(270);
$sb_filter = FabrikHelperElement::filterValue(287);
$ann_filter = FabrikHelperElement::filterValue(127);
$cal_filter = FabrikHelperElement::filterValue(253);
$com_filter = FabrikHelperElement::filterValue(99);
$hor_filter = FabrikHelperElement::filterValue(82);
if (!empty($ad_filter)) {
//echo "Yes, ad filter is set, pulling filter value";
$record = $ad_filter;
}else if (!empty($sb_filter)) {
$record = $sb_filter;
}else if (!empty($ann_filter)) {
$record = $ann_filter;
}else if (!empty($cal_filter)) {
$record = $cal_filter;
}else if (!empty($com_filter)) {
$record = $com_filter;
}else if (!empty($hor_filter)) {
//echo "Yes, hr filter is set, pulling filter value";
$record = $hor_filter;
}else if (isset($_GET['AD___item_id_raw'])){
//echo "Filter is not set, check URL, found AD ID";
$record = $_GET['AD___item_id_raw'];
}else if (isset($_GET['SB___item_id_raw'])){
//echo "Filter is not set, check URL, found SB ID";
$record = $_GET['SB___item_id_raw'];
}else if (isset($_GET['Ann___item_id_raw'])){
//echo "Filter is not set, check URL, found Ann ID";
$record = $_GET['Ann___item_id_raw'];
}else if (isset($_GET['Com___item_id_raw'])){
//echo "Filter is not set, check URL, found Com ID";
$record = $_GET['Com___item_id_raw'];
}else if (isset($_GET['Insp___item_id_raw'])){
//echo "Filter is not set, check URL, found Inspection ID";
$record = $_GET['Insp___item_id_raw'];
} else {
echo "ID not detected";
goto skip;
}