Unfortunately I cannot share the script. Even if I could, the script may not work because it depends on how you are creating your measurements, condition monitoring points, work orders, and how it is relating to your assets and locations.
I can try and clear things up a little bit more. The POINTWO table keeps track of work orders that are being creating when measurements are beyond the limits set on the condition monitoring point. Your "follow up" will be the wonum listed in this table. Your "originator" you need to find based on the last measurement found that the specific condition monitoring point is monitoring. Depending on your environment, you can typically find this information based of off measurement values and dates, possibly even the WOMETER table. The code that actually creates the related record will mostly be done by the java class. Your automation scrip will just need to call the "generateWORelRecord" function. Looks something like this yourFollowUpMbo.generateWORelRecord(yourOriginatorMbo).
From here if you were to pull up either work order and move to the Related Records tab, you should see an entry in there pointing you to your work orders.
Feel free to direct message me if you need more.
thanks
Eric
------------------------------
Eric Godel
Bay Systems Consulting
------------------------------
Original Message:
Sent: 06-03-2022 08:42
From: William Riffle
Subject: Condition Based Monitoring Work Orders
Hi Eric,
Thanks so much for your reply! I see where you are going and I had similar thoughts but I'm still not clear on how I can populate the related work order when the measurement is created. Can you share the script that you used to accomplish this?
Bill
------------------------------
William Riffle
KBR
------------------------------
Original Message:
Sent: 06-01-2022 18:01
From: Eric Godel
Subject: Condition Based Monitoring Work Orders
Yes there is, I did it with an automation script off of the POINTWO table. From here you can build a relationship that will be able to find the work order that created the measurement, either by using a script to populate the related work order when the measurement is created, or by using the data from the measurement to get to the exact work order your looking for. After you have your originator, you can use the WORKORDER relationship on the POINTWO table to find your new work order that's being created from condition monitoring. After you have both the originator and the follow up you can use the generateWORelRecord method to create a related record entry for both work orders.
I hope that makes sense!
Eric
------------------------------
Eric Godel
Bay Systems Consulting