Field inheritance from Parent table

Rachael12
Tera Contributor

 I have created a field 'Services' on Change table, its is dropdown field.

I am utlising this field both on Change as well change task table. Now, when select any value say 'ABC' on this field, the same gets reflected in all of all the change tasks related to that change as well the change itself.

How do I remove this dependency. There is no BR, scripts or UI policies written for it.

 

Thanks 

3 REPLIES 3

Abbas_5
Tera Sage
Tera Sage

Hello @Rachael12,

 


To prevent changes to a field in a change request from automatically reflecting in associated change tasks, you need to break the dependency between the two tables. This can be achieved by creating a business rule on the change task table or by adjusting UI policies and field configurations. Here's a breakdown of the process: 

Please refer to the below steps:

1. Business Rule (Recommended):

Create a Business Rule:
Create a business rule on the change task table (e.g., change_task) that fires after the change_request field is updated.
Check for Change:
Within the business rule script, check if the change_request field has been changed.
Conditional Logic:
If the change_request field is changed, then you can choose to:
Option 1: Ignore the change: Do nothing to the change task field. This will prevent the change task field from being updated with the new value.
Option 2: Update with a default: Set the field on the change task to a specific default value if needed.
Option 3: Update with a specific logic: Apply a specific logic or calculation to the field on the change task based on the new value in the change request. 

Example Business Rule Script:

JavaScript

// Example of a business rule to prevent the change request field from being updated in change tasks
(function executeRule(current, previous /*null when async*/) {
if (current.change_request != previous.change_request) {
// Do nothing to the field in the change task.
// Or, if you want to set a default value:
// current.your_field = "default_value";
}
})(current, previous);
If it is helpful, please mark it as helpful and accept the correct the solution. By refer to this solution it will helpful to them.

Thanks & Regards,
Abbas Shaik

Thanks Abbas, I will implement and check.

Also is this a usual behaviour between parent and child field as I have never such behaviour when variables are extended from Task table in its child tables.

@Rachael12 , Is your query resolved ?

 

Regards,

Abbas