- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2021 03:14 PM
Hello Community,
I need to update the field Users ( the recipients) in the form of one scheduled report to be dynamic values.
I have created the scheduled report with one user because this one will be always as default, but I need to add more users to the list.
I have selected the "conditional" option to create one script that makes a query to a table, I get an array variable with all the sysid for the users as unique.
So when I run the script on background to verify the values, I got the correct sysids :
example:
*** Script: assignedUnique = ed83fc7a1b0633806278edf9bc4bcb12,978178521baa77846278edf9bc4bcbdf,ce47701e1bae77846278edf9bc4bcbee, etc
so when I try to update the current form for the scheuled report to add the new recipients nothing changes and only send the report to the original default user that I put manually.
this is my code that Im using to update the Users field on the scheduled report form:
but when I execute it, nothing happens and is only sending the notification to first user that I enter manually in the field, is not adding/updating the other recipients, its like the script was ignored.
Any idea how can I make this work?
Regards
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2021 08:53 AM
Hello,
Please refer this article: Scheduling a report for dynamic Recipients based on the table column of the report
Regards,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2021 03:35 PM
Hi, without clear details of your code it's difficult to assess your solution, but I would think a notification email mail script that populates recipients via the email.addAddress method would be your best/easiest way forward.
You would need to dot.walk to the users email addresses, either directly via the user record or via their Notification devices (depending on your configuration).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2021 03:59 PM
The following community article should help
https://community.servicenow.com/community?id=community_question&sys_id=c8cfcb65dbdcdbc01dcaf3231f961971
https://community.servicenow.com/community?id=community_article&sys_id=873319531b8b98508672ea89bd4bcb64
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2021 08:53 AM
Hello,
Please refer this article: Scheduling a report for dynamic Recipients based on the table column of the report
Regards,
Sagar Pagar