I’ve created a solution for HR and contact list, where I group people into different categories such as Employees, Freelancers, Suppliers, Clients and Other.
I have an specific field for each category and I use a checkbox for each field, with a “1” Boolean result. So I have a employee_ind field, a freelancer_ind, client_ind, supplier_ind and other_ind.
That works fine.
Now I created a list view where I have global checkboxes for each category so I can filter people by category.
The idea is to create a script where if one of the global fields representing one of the the categories gets clicked, the category is either added or removed to the find.
So if Clients, Suppliers and Freelancers global Fields are checked, I want to see all records of People matching those three categories, clients, suppliers and freelancers. If I uncheck suppliers, I see only clients and freelancers, and so on.
I don't know if this is relevant or not, but some people can have more than one category. I can have a client that is also a supplier for example.
I also have a location field, containing one of two locations (LA or NY) so I know where is the person located. I want to add this extra search to the previous category, so in the example above, I can see clients and freelancers located in LA, clients and freelancers located in NY or both.
Every-time one of these global fields gets clicked, the script has to run looking for which fields are empty and which fields are clicked so the find gets updated, either adding or omitting one or more categories into the find.
Can somebody help me script this problem?
Thanks a lot!