- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on ‎09-15-2022 08:50 AM
Description:
You all might have come across the requirement where you need to update or delete bulk records based on some conditions and you might have made use of Fix Script or Background Script. But are you aware of the possibility to achieve the same without scripting ?? Yes you guessed it right, it is possible through System Data Management available Tokyo release onwards.
At present System Data Management supports following jobs
- Update Job
Delete specific number of records from a table without using scripts by creating and executing delete jobs. - Delete Job
Update specific number of records simultaneously without using scripts by creating and executing a batch update job.
Procedure to create Update Jobs:
Use Case : Update all active Incidents category to "Inquiry / Help" where Assignment group "Service Desk".
-
Navigate to System Data Management > Update Jobs.
-
Create a new Update Job and Fill the form according your use case.
FieldsDescriptionTable Select the Table that contains the records you want to update. Run business rules and engines Setting Run business rules and engines to True enables and False disables the running of Business Rule. is same as using setWorkFlow(true/false) in Script. Preview Select Preview to view the number of records that match the conditions & clicking on the link with the number will open all matching records. Fields & values In the Fields & values lists, select the field that you want to update and a new value. Condition Limit the number of records in the update job by adding a condition or conditions that records must meet.
- Select a field, operator, and field value.
For example, [Category] [is] [Software]. - (Optional) Use the OR and AND operators to add conditions.
- (Optional) Select New Criteria to add another set of conditions.
Auto updating system fields Setting Auto updating system fields to True will update audit fields (such as sys_updated_by & sys_updated_by) and setting to False will suppress updating the fields.
Auto updating system fields is same as using AutoSys Fields(true/false) in Script.Note: Limiting the number of records that are added to the update job can help prevent the table from being locked when the job is executed.
- Select a field, operator, and field value.
- Select Continue to save the record.
- As soon as the job is saved the form provides options to schedule the job or Execute Now.
Run at: Select the time to schedule the Update Job or you can run the Update Job during non-business hours to minimize the potential performance impact on your users.
Execute Now: Clicking Execute Now will execute the job immediately. - Click on Execute Now to execute the Update Job.
- You can even rollback a completed Update Job to revert the updates to the records to do so click on Check execution results or Navigate to System Data Management > Update Jobs & open already executed job & under Related Links click on Rollback.
Update Job Results:
Before Update Job Execution
After Update Job Execution
Procedure to create Delete Jobs:
Use Case : Delete all Incidents where Short Description contains Test keyword.
-
Navigate to System Data Management > Delete Jobs.
-
Create a new Delete Job and Fill the form according your use case.
- Select Continue to save the record.
- As soon as the job is saved similar to Update Job the form provides options to schedule the job or Execute Now along with Preview Cascade.
Run at: Select the time to schedule the Update Job or you can run the Update Job during non-business hours to minimize the potential performance impact on your users.
Preview Cascade: Clicking on Preview Cascade will displays the number cascade deletions by the table. [ If a record in the parent table is deleted, then the corresponding records in the child table will automatically be deleted ]
Execute Now: Clicking Execute Now will execute the job immediately.
For example deleting all Incidents where Short Description contains Test keyword will also deletes the associated Task SLA records.
- Click on Execute Now to execute the Delete Job.
- Similar to Update Job you can even rollback a completed Delete Job to revert the deleted records to do so click on Check execution results or Navigate to System Data Management > Delete Jobs & open already executed job & under Related Links click on Rollback.
Delete Job Results:
Before Delete Job Execution
After Delete Job Execution
Happy Learning !!!
- 7,244 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello, I think this is an awesome feature, if I can get it to work. I am wanting to close a bunch (thousands) of tasks in our test environment.
Im doing the following.
Table sc_task
Conditions
Assignment group is IT-User Access
Active is True
created on 08/02/2022
Fields
Summary - closed
Description - closed
Work notes - dy closing tasks
State - Closed Complete
Assignment group - IT-User Access
Assigned to - user name
Its running without errors, and the log says its updating, but the task are not closing.
Any help would be greatly appreciated.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello,
Try unchecking the Run business rules and engines checkbox and see.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Great Article.
Please let me know whether if there is any way to automatically schedule it like a scheduled job?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Yes its possible please follow below docs
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
What is the use of checkboxes?
- Run business rules and engines
- Auto updating system fields
Before the execute the job, If both are active what happened?
Before the execute the job, If both are false what happened?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I was updated assigned is from empty to platform user , I want to revert all the changes I was done in the incidents is it possible?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I hope that update/delete jobs are good with Admin access. Do we have similar solution for other non admin users when they have edit access on particular tables such as cmdb ci, alm_asset, alm_hardware tables? Really appreciate your suggestions! Thanks.