RecordFinder trigger action based on its relation

Hi All,

If I use RecordFinder widget on the backend then is it possible somehow to get more information of the selected record on the backend form?

I would like to set a trigger action on an other element that based on the selected item of the RecordFinder but not depends on its value but a relation.

E.g.: I select a Brand with the RecordFinder widget and the selected Brand has a relation to a Country model (Brand belongs to a Country) and trigger action should be fired if the selected Brand has relation to Country ( “China”.

Is it possible to do somehow or if not then can you suggest some alternative solution?

Thanks in advance for your help,

I have solved the problem with filterFields method on the Model.

If anybody is interested, it looks something like this:


public function filterFields($fields, $context = null)
	if ( !$fields->brand->value ) 
		return false;
	$brand = Brand::with('country')->find($fields->brand->value);
	if ($brand->country->name == 'China') {
		$fields->otherfield->hidden = true;
	} else {
		$fields->otherfield->hidden = false;