Job Card -> choosing Employee (filter & advanced search)

Hi @ll,
does anyone knows, which filter options are used in JobCards “Employee” (or where I can find that bymyself)? … coz the current filter shows also employee, which are already left. … and do you know too, how to change the filter? … Second thing … the Advanced search, doesn’t work for my employee’s (as long as they’re restricted users, which I want to keep) … so I changed the Employee field to "
Ignore User Permissions", so that the Production Teamlead can choose employee’s, which works … until … he needs the “Advanced search” functionality … there is abviously the "
Ignore User Permissions" not forwarded … also here, does anyone know, how to change that?

Best regards
schmutzfuss

Hi @schmutzfuss ,

You have to add a Link field filter in employee field in job card. Filter shows only active employee records in options.

Thanks

Hi Dhruvin-Bhaliya,
thx for your feedback … could you please tell me where to add the filter?

By documentation, there should be a filter button, if a field is linked, I have to admitt, I cannot see that button, but additional, the employee field is also a multiselelect field … so any ideal, where to add the new filter?

Thanks

Hi @schmutzfuss,

Please apply the client and check it.

frappe.ui.form.on("Job Card", {
  onload: function(frm) {
    frm.set_query("employee", function() {
      return {
        "filters": {
          "status": "Active"
        }
      };
    });
  }
});

Output:

Thank You!

Hi NCP,
thanks for your Feedback, the filter in the first mask is activated, nice to know how to do that :slight_smile: thanks. Do you have an idea for the second part too? Use the “advanced search”?

Greetings
schmutzfuss

No idea but you can check the advanced search-related post.

https://discuss.frappe.io/search?q=Advanced%20Search

Thank You!