For a field I'm displaying in the gridfield, it's value is a int and using $summary_fields to display the matching title value for each ID. i.e.
private static $summary_fields = array(
'PickUpLocationTitle' => 'PickUpLocation'
);
function getPickUpLocationTitle() {
if ($Pages = VehicleLocations::get()->byID($this->PickUpLocation)) {
return $Pages->Title;
} else {
return $this->PickUpLocation;
}
}
This works fine, but the issue is when filtering on the fields. As the value is a int and not a text varchar, search brings up no results.
Is it possible to either add a custom filter with a drop down field of locations to search on or translate the location title to the int id?
Thanks
Scott