This document is intended to provide a detailed guide and examples about how to write an EKL Script with opening id ‘PPRSpreadsheetAttributeValuePropagation_ID’
Introduction
This BL is commonly used to dynamically update the value of one attribute depending on the value of another attribute in PPR Spreadsheet. This is commonly needed where attributes are interdependent.
Note: “PLMAttributesPropagation" BL will not be triggered on the PPR Spreadsheet editor object. you need to use opening ID "PPRSpreadsheetAttributeValuePropagation_ID" to propagate attribute values in PPRSpreadsheet.
Version – 2024x FD04 (FP2432), 2025x FD01 (FP.CFA 2506) and 2026x GA.
Pre-requisites:
Licenses
- PPL (Process Engineer): Required to create Mfg. Item Structure, Process objects and Work Instructions
Disclaimer: Licenses mentioned above are as per 2024x, 2025x and 2026x documentation.
| Opening ID: | PPRSpreadsheetAttributeValuePropagation_ID |
| Customization intent: | Execution |
| Execution context: | Client |
| Usage | This Opening ID is triggered after an attribute is modified in PPR Spreadsheet. |
Example 1: Attribute Dependency
| No | Use Case |
| 1 | If attribute “Outsourced” is set as Yes then set Attribute “Planning Required” as No |
| 2 | If custom attribute “Custom_Verification” is set as Yes, append “V_” as prefix and timestamp as suffix on Title |
| 3 | If custom attribute “Custom_Verification” is set as No, remove “V_” prefix and timestamp as suffix on Title if any |
As 'PLMAttributePropagation' BL will not be invoked on PPRSpreadsheet objects, we have to implement this BL to handle some use-case scenario mentioned in this post.
This business logic (BL) will handle the following use cases related to attribute dependency:
Handling Attribute Dependencies:
- If the Outsourced attribute is set to Yes, the Planning Required attribute should automatically be set to No and vice-versa
- If the custom attribute Custom_Verification is set to Yes, the Title attribute will be prefixed with "V_" and suffixed with a timestamp.
- If the custom attribute Custom_Verification is set to No, the V_ prefix and timestamp suffix will be removed from the Title attribute.
Note: Custom attributes "Custom_Verfication” is created on Manufacturing Assembly and Provide type to demonstrate the use-case
Logical Flow
Business Rule Sample
Detail Explanation
Scenario 1: Modifying "Outsourced" Attribute
The user modifies the Outsourced attribute from No to Yes in PPRSpreadsheet. The Business Logic (BL) is triggered automatically when the attribute Outsourced is updated. When the Outsourced attribute is set to Yes, the Planning Required attribute will be automatically updated and set to No by the BL.
Logic:
//Attribute dependency case of Outsourced and planning required
if(strAttributeID=="V_Outsourced")
{
If(strAttributeValue == "Yes")
{
ItemReference->SetAttributeString("V_NeedDedicatedSystem","NO")
ReturnMessage = "ValuePropagationSucceeded, Planning required set to Yes"
propagatedStatus=1
}
else
{
ItemReference->SetAttributeString("V_NeedDedicatedSystem","YES")
ReturnMessage = "ValuePropagationSucceeded, Planning required set to No"
propagatedStatus=1
}
} Scenario 2: Modifying "Custom_Verification" Attribute to Yes
The user changes the Custom_Verification attribute value to Yes in PPRSpreadsheet. The Business Logic (BL) is triggered automatically when the Custom_Verification attribute is updated to Yes. The Title attribute will be modified by appending the prefix "V_" and adding the current timestamp as the suffix.
Logic:
if(strAttributeID=="Custom_Verification")
{
if(strAttributeValue=="Yes")
{
Trace(1,"Custom_Verification is Yes")
set Title = ThisObject.V_Name
set index = Title.Search("V_")
if(index <> 0)
{
set NewTitle="V_"+Title
set index = NewTitle.Search("|")
if(index < 0)
{
NewTitle = NewTitle + "|"+nowString
Trace (1,"NewTitle=========> ",NewTitle)
}
ThisObject.SetAttributeString("V_Name",NewTitle)
ReturnMessage = "ValuePropagationSucceeded, Title updated"
propagatedStatus=1
}
}
}Scenario 3: Modifying "Custom_Verification" Attribute to No
The user changes the Custom_Verification attribute value to No. The Business Logic (BL) is triggered automatically when the Custom_Verification attribute is updated to No. The Title attribute will be modified again by removing the "V_" prefix and the timestamp suffix if they exist.
Logic:
if(strAttributeID=="Custom_Verification")
{
if(strAttributeValue=="No")
{
set Title = ThisObject.V_Name
set index = Title.Search("V_")
if(index ==0)
{
set length = Title.Length()
set NewTitle = Title.Extract(2,length-2)
ThisObject->SetAttributeString("V_Name",NewTitle)
set index = NewTitle.Search("|")
if(index >= 0)
{
set NewTitle = NewTitle.Extract(0,index)
ThisObject.SetAttributeString("V_Name",NewTitle)
ReturnMessage = "ValuePropagationSucceeded, Title updated"
propagatedStatus=1
}
}
}
}Other Supported DELMIA Types
In this example, we have used ‘DELFmiFunctionReference’ fact-type.
The same Business Logic can be applied to other DELMIA types, depending on the specific needs of your implementation.
Business Rule Deployment
The below page can be referred for Business Rule deployment.
For deployment using Data Setup app following Resource set ID and opening needs to be used:
Resource Set ID:
Opening:
Reference
Documentation: Propagate Attribute Value (PPRSpreadsheetAttributeValuePropagation_ID)
Author
Person of Contact: @Akansha BHASAKHETRE
