Variable vs fields
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi all
I need to create different records producer in order to create CSM case type. In record producer there are many variables. I know wich can add variables formatter to case layout and so agent can see all variables in workspace or UI Standard
But, in worst scenario, requester and agent can to update variable value during the case life cicle and also both actor can to query or report variables (ex. need to search all cases where "variable A = XXXX").
I can create a field for each variables and map variable to field and so accomplish previous need, but I need to replicate all 'Catalog UI Policies' or 'Catalog client scripts' in record producer as "UI Policies" and "Client scripts" in workspace/UI Interface. Also when the agent update a field need to update mapped variable in order to show new value to requester in CSM portal
Wich is the best practics for this scenario? Create fields on table for each variables or there is a way to manage (reporting, query o update) variables as fields?
Can you suggest different possible approaches for this?
Regards.
Giuseppe
- Labels:
-
Case Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
my thoughts
-> I suggest to map catalog variables to fields on the case table when you need robust reporting, querying, and real-time updates by both requester and agent
Reasons below:
- Easy reporting and querying using standard report builders.
- Real-time updates and visibility for both agents and requesters.
- Reuse of UI policies, client scripts, and business rules for field-level logic.
- Simpler data synchronization between the case and portal views
-> if you only use variables then you need complex reporting as data for variables is stored in other table, also sharing updates will be difficult
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
52m ago
Hi Ankur
Thaks a lot for your response.
Can you explain how I can obtain "Simpler data synchronization between the case and portal views". When I map variable and field, if agent update the field in workspace also variable was updated? Can you provide more detail for this UC?
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
48m ago
@giuseppem
you can use after update BR on your table
Condition: Field 1 [Changes]
Script:
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
current.variables.variableName = current.fieldName;
current.update();
})(current, previous);
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader