- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2017 04:18 AM
Hi
I have an issue. I have created a new module called Honey Jars and in the module link type i have selected URL(from arguments). In the arguments i am calling a script include like
i have written a script include like
now the issue is this script include is not getting called as the event is never logged. Can any one please help me solve this issue. Basically i want to filter the list view based on the logged in user group membership.
The list shows a filter like
Regards
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2017 09:55 AM
John, you can indeed do this. The important thing to remember is that the only thing your script include should RETURN is a string for what you want to put into the query.
For example, if your arguments are "u_honey_jars_list.do?sysparm_query=u_contract=javascript:getSomething()&sysparm_view=", then your script include should return a string value of whatever u_contract should be. The way it's written here, with an equals sign after u_contract, you need to return a SINGLE sys_id to it. If you return multiple, it won't work. If you were wanting to return multiple sys_ids to it, return a comma separated string, not an array object.
As proof it will work, see the attached screenshots.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2017 08:19 AM
Thank you Robbie for taking some time and answering the question. Im aware of the OOTB method but is there a way that i can call my custom method and filter the list of record based on a custom reference field?
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2017 08:29 AM
sorry there were some typos in the screen shot i have removed them. Please have a look
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2017 08:30 AM
if you want i can provide access to the personal dev instance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2017 09:55 AM
John, you can indeed do this. The important thing to remember is that the only thing your script include should RETURN is a string for what you want to put into the query.
For example, if your arguments are "u_honey_jars_list.do?sysparm_query=u_contract=javascript:getSomething()&sysparm_view=", then your script include should return a string value of whatever u_contract should be. The way it's written here, with an equals sign after u_contract, you need to return a SINGLE sys_id to it. If you return multiple, it won't work. If you were wanting to return multiple sys_ids to it, return a comma separated string, not an array object.
As proof it will work, see the attached screenshots.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2017 02:24 PM