- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 10:24 AM
One variable - business_unit(Choice- X,Y,Z,A,B,C)
Another variable- impacted_business_unit (reference to business_unit variable)
Requirement : To map the impacted_business_value for all the records(1000s) with below mentioned conditions :
1. All the records with choice X & Y Selected in Impacted business unit, it should be changed to Choice A.
2. All the records with choice Z & C selected in Impacted business unit, it should be changed to Choice B.
Any help on this would be highly appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2023 07:43 AM - edited 10-19-2023 07:44 AM
Hi @developersn,
Please confirm if that business_unit & impacted_business_unit both are mapped in some custom table or its just value in record table like incident.
If this mapping is already configured in some table ( either system table or custom ) then go with fix script code, here some of our friends already shared the code snippet logic try that.
In case, you have any issue please share the mapping table details and fix script code you are writing so we can debug the issue.
Suggestion : Code the fix script and run it for few record only , once test pass then go for all records.
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 10:55 AM
Hi @developersn,
You can update the business_unit value from X & Y to A ( and Z & C to B ) , to all impacted_business_unit record in the table.
Please check the table columns, business_unit and impacted_business_unit, first filter the records with business_unit = X Or Y, once you have result you can change the business unit value to A. Repeat the same for Z & C.
In the list view, you can update 100 records in one go, you can use "Update Selected" or "Update All" option for bulk update.
Let us know if there is any other challenges with this update at your end.
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 08:30 PM
Hi @ AshishKMishra,
Thanks for the response.
Actually we are looking for a solution with script as this update requires to be done on multiple tables. Kindly suggest.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 08:44 PM
Hi @developersn ,
The logic for the script should be somewhat like this
// Check if business_unit is X or Y, then set impacted_business_unit to A
if (current.business_unit == 'x' || current.business_unit == 'y') {
current.impacted_business_unit = 'a';
}
// Check if business_unit is Z or C, then set impacted_business_unit to B
else if (current.business_unit == 'z' || current.business_unit == 'c') {
current.impacted_business_unit = 'b';
}
If u r running a fix script add this logic in there n try once.
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2023 07:43 AM - edited 10-19-2023 07:44 AM
Hi @developersn,
Please confirm if that business_unit & impacted_business_unit both are mapped in some custom table or its just value in record table like incident.
If this mapping is already configured in some table ( either system table or custom ) then go with fix script code, here some of our friends already shared the code snippet logic try that.
In case, you have any issue please share the mapping table details and fix script code you are writing so we can debug the issue.
Suggestion : Code the fix script and run it for few record only , once test pass then go for all records.
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution