Comments on: Adding an Activity Formatter Section to any Table https://servicenowguru.com/system-ui/adding-activity-formatter-section-to-anytable/ ServiceNow Consulting Scripting Administration Development Tue, 28 May 2024 21:44:19 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Nikhil Nishant https://servicenowguru.com/system-ui/adding-activity-formatter-section-to-anytable/#comment-6378 Thu, 12 Jun 2014 15:05:37 +0000 https://servicenowguru.wpengine.com/?p=699#comment-6378 Hi,

Can anyone help me with including Emails in the “Activities” in a Change Request Form?

Thanks.

]]>
By: Nikhil Nishant https://servicenowguru.com/system-ui/adding-activity-formatter-section-to-anytable/#comment-6377 Thu, 12 Jun 2014 15:03:11 +0000 https://servicenowguru.wpengine.com/?p=699#comment-6377 In reply to ND.

To configure this property:

Navigate to System Properties > UI Properties.
Locate the following property:
“List of roles (comma separated) that can view emails in the Activity Formatter when “Sent/Received Emails” are included.”
Add roles to the property, separated by commas.
These are the only roles that can see emails in the activity formatter. All other roles are blocked from seeing emails. If no roles are listed, all users can see emails. As of the Berlin release, the itil role is on the list by default.
Click Save.

]]>
By: Mark Stanger https://servicenowguru.com/system-ui/adding-activity-formatter-section-to-anytable/#comment-6376 Mon, 14 Jan 2013 10:35:03 +0000 https://servicenowguru.wpengine.com/?p=699#comment-6376 In reply to Nabilah.

Simplest way is just to script the update into the ‘Comments’ field of the incident record.

]]>
By: Nabilah https://servicenowguru.com/system-ui/adding-activity-formatter-section-to-anytable/#comment-6375 Mon, 14 Jan 2013 09:07:39 +0000 https://servicenowguru.wpengine.com/?p=699#comment-6375 Mark,

How can I add Outage record update of an Incident in the activity log so that users can review the outage changes in the activity log..?

Thanks.

]]>
By: Jim Pisello https://servicenowguru.com/system-ui/adding-activity-formatter-section-to-anytable/#comment-6374 Fri, 14 Dec 2012 14:03:28 +0000 https://servicenowguru.wpengine.com/?p=699#comment-6374 In reply to Steve H.

Steve, this is a great modification for those who use the variable editor. We’ve stayed away from it for the most part but we’re starting to use it in some limited cases, and having an easy way to see which variables have been changed as the task is processed is going to be very useful for us. Thanks for providing this solution.

]]>
By: Michele https://servicenowguru.com/system-ui/adding-activity-formatter-section-to-anytable/#comment-6373 Thu, 13 Dec 2012 21:45:39 +0000 https://servicenowguru.wpengine.com/?p=699#comment-6373 Two words: You Rock!!

Thanks a bunch, I really like this solution.
Michele

]]>
By: Steve H https://servicenowguru.com/system-ui/adding-activity-formatter-section-to-anytable/#comment-6372 Thu, 13 Dec 2012 21:23:31 +0000 https://servicenowguru.wpengine.com/?p=699#comment-6372 In reply to Michele.

Michele,
What we have done is created a business rule on our sc_task table that populates the worknotes on the task with the variable changes.
This might give you a idea for the item table.
I can see creating a new journal field specifically for variable changes if you didn’t want them in the work notes.

Table: sc_task
When: Before
Update=true

var questions = getQuestions(current.request_item.sys_id, current.sys_id);

var workNote = ”;
for (name in current.variable_pool) {
if (previous.variable_pool[name] != current.variable_pool[name]) {
var q = getQuestion(questions, name);
if (workNote != ”) {
workNote += ‘\n\n’;
}
if (q != null) {
workNote += “Question ‘” + q.getLabel() + “‘ changed to:\n” + current.variable_pool[name].getDisplayValue();
} else {
workNote += “Question ‘” + name + “‘ changed to:\n” + current.variable_pool[name].getDisplayValue();
}
}
}
if (workNote != ”) {
current.work_notes.setJournalEntry(workNote);
}

function getQuestion(questions, name) {
for (var x = 0; x < questions.size(); x++) {
var q = questions.get(x);
if (q.getName() == name) {
return q;
}
}
return null;
}

function getQuestions(itemID, taskID) {
var qs = new Packages.com.glideapp.servicecatalog.variables.VariablePoolQuestionSet();
qs.setRequestID(itemID);
qs.setTaskID(taskID);
qs.load();
var fQuestion = qs.getFlatQuestions();
return fQuestion;
}

]]>
By: Michele https://servicenowguru.com/system-ui/adding-activity-formatter-section-to-anytable/#comment-6371 Thu, 13 Dec 2012 20:22:08 +0000 https://servicenowguru.wpengine.com/?p=699#comment-6371 That’s what I suspected. I am looking at a few other options. I created a modified version of the Audit History relationship that just presents the audit history of fields with label starting with “VARIABLES” and set it as a embedded list in the Requested Item form. Only downside is it stores the variable name instead of the question.

I’m about to start looking at business rule that captures all the field changes on update (like when we send email notification on Incident updated to the watchlist with a list of the changed fields/values) but I suspect it doesn’t treat the variables as field changes. Also want to look at onSubmit client script to try to capture what variables may have been changed.

I really just want to let the approver know if any of the variables have changed before they approve again. If we can show in a journal field or something that variable “How many users are impacted” changed from 3 to 300 that would be enough. Not a great example but you get the idea.

Any thoughts on this?

Thanks,
Michele

]]>
By: Mark Stanger https://servicenowguru.com/system-ui/adding-activity-formatter-section-to-anytable/#comment-6370 Thu, 13 Dec 2012 18:50:57 +0000 https://servicenowguru.wpengine.com/?p=699#comment-6370 In reply to Michele.

@Michele, I’ve never seen that done. You’d likely have some pretty significant jelly scripting in front of you if you wanted to do that.

]]>
By: Michele https://servicenowguru.com/system-ui/adding-activity-formatter-section-to-anytable/#comment-6369 Thu, 13 Dec 2012 18:46:41 +0000 https://servicenowguru.wpengine.com/?p=699#comment-6369 How about activity formatter to show changes to variables on a requested item? I see that the changes to the variables are stored in the sys_history_set tables but not sure how to get them into the activity log with the variable question instead of the variable name. Has anyone else done something like this?

Thanks-Michele

]]>