IBM Support

Using Automation Script instead of binding variable :&OWNER&.<ATTRIBUTENAME>

Troubleshooting


Problem

Binding variable :&OWNER&. returns a null value when defined as a default value in a Database Configuration application. Since this is beyond the scope of a code fix, complicated to be fixed in code, we recommend you use an Automation Script to achieve this functionality.

Symptom

A Work Order's description value should be the same as the Service Request's description value when the Work Order is created from a Service Request.

If you use :&OWNER&.DESCRIPTION as a defaultvalue from database configuration to achieve this, the result will comes out as below.


1) When a Work Order is created from the Service Requests application, the WO's description value is populated with the same value as the SR's description value.

2) When the Work Order is being created manually from the Work Order Tracking application, the WO's description value is populated as ':&OWNER&.DESCRIPTION'.

Resolving The Problem

You can implement this within Automation Scripts in the way you want.

[Using Add Event] - If your logic is only to copy description.
1. Go to the Automation Scripts application and do Select Action / Create / Script with Object Launch Point.

2. Set the Launch Point Name for object Workorder , check the "Add?" checkbox and click Next.

3. Name the script and add a new row for Variable and set as below, then click Next

4. Type as below In the source code and click Create

5. Open the script just created, change the status to Active and test creating a new WO from the Service Requests and Work Order Tracking applications


[Using Initialize Event] - If you need to add more logic along with copying description.
1. Go to the Automation Scripts application and do Select Action / Create / Script with Object Launch Point.

2. Set the Launch Point Name for object Workorder , check the "Initialize?" checkbox and click Next.

3. Name the script and add a new row for Variable and set as below, then click Next.

4. Copy and paste the text below In the source code and click Create.

5. Open the script just created, change the status to Active and test creating a new WO from the Service Requests and Work Order Tracking applications.

[{"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"Business Unit":{"code":"BU055","label":"Cognitive Applications"},"Component":"--","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.5","Edition":"","Line of Business":{"code":"LOB02","label":"AI Applications"}}]

Document Information

Modified date:
17 June 2018

UID

swg21686521