Can we call script include in condition builder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2024 04:02 AM
Can we call script include in condition builder of Widget instance.
I want to pass array of users(from Script include) to 'created by' field in the widget instance. Please provide me the syntax on how to write it.
Script Include name: mySI
function name: myFun()
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2024 04:25 AM - edited 08-22-2024 04:26 AM
javascript: new scriptinclude().functionname(anyparameters);
In your case:
javascript: new mySI().myFun();
Mark correct and helpful.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2024 04:57 AM
@Aruna Sree Yela Yes, you can call the script include method from the condition builder.
Here is how you should call it.
javascript: new mySI().myFun();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2024 08:58 AM
Hi @Sandeep Rajput @Saiganeshraja , thanks for the responses
But I'm getting null values in the condition, Am I returning it correctly?
usersArray.push(gr2.user_name.toString());
return usersArray;
Note: When I call script include in Background script I'm getting the array values
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2024 09:05 AM
@Aruna Sree Yela Try the following and see if it works.
usersArray.push(gr2.user_name.toString());
return usersArray.toString();