Report : Get filtered options in report's global filter

image

I built a script report and I wish to make a global filter that would allow the user to view the records which has certain employee. But I want the filter to only display those employee ID’s which have a certain role say “Sales Manager”. How to do this via JS ?

https://github.com/frappe/erpnext/blob/70b7d3280b5032a2f77d06b64d7d20ee6ba1fb84/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js

Set the options in onload

can we do this from JS itself ?

This is in js only. Can you post your js file code.
If you mean getting the list of Employees in “Sales Manager” role, I think it is possible only though server side call.