Applying default filter clears field

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
mcasey
Posts: 3
Joined: 2019-04-08 16:47

Applying default filter clears field

Post by mcasey » 2020-01-27 10:19

Hi guys,

I have 1 table in my database called "Clients" which I generated with appgini.

In the folder, I have the Standard Clients_view.php file and in the hooks folder I have the Clients.php folder.

I want to have a standard view and a filtered view so I went ahead and created a Clients_view_Leads.php in the main folder and a Clients_Leads.php file in the hooks folder. I have edited the Clients_Leads.php file as below and the second view is filtering perfectly and displaying the records which have been set to "Lead".

function Clients_init(&$options, $memberInfo, &$args) {
addFilter(1, 'and', 17, 'equal-to', 'Lead');
return TRUE;
}

My issue is when I open a record which has been filtered and update any field eg. the company name It resets the "lead" field to blank and it is then removed from the view.

The field that is being filtered is set up as a drop down option list - is this what is causing the issue?

Thanks for any help, much appreciated.

Post Reply