User1974
User1974

Reputation: 386

WOSERVICEADDRESS X & Y: Differentiate between sources (SA vs. user-defined)

A question about Maximo 7.6.1.1 work orders:

In the service address tab, there are LONGITUDEX and LATITUDEY columns.

enter image description here

The columns can be populated a couple of different ways:


Is there a way to determine what the source was for the LONGITUDEX and LATITUDEY columns?

For example, if the source was a user, then populate a custom field. Else, leave it null.

(Related keyword: Maximo Spatial)

Upvotes: 1

Views: 122

Answers (2)

User1974
User1974

Reputation: 386

I added a custom field to WOSERVICEADDRESS called XY_SOURCE.

And I created an automation script with an object launch point (Save; Add/Update; Before Save).

sa = mbo.getString("SADDRESSCODE")
x = mbo.getDouble("LONGITUDEX")

if sa and x:                                  --Improved, as per Preacher's suggestion
    mbo.setValue("XY_SOURCE", "Service Address")
elif x:
    mbo.setValue("XY_SOURCE", "Manual")
else:
    mbo.setValue("XY_SOURCE", None)

This seems to do the trick.

I'd be happy to hear if there are any flaws with this logic (or opportunity for improvement to the code).

Upvotes: 1

Preacher
Preacher

Reputation: 2145

Out of the box, I'm not aware of a way to know that.

If you have configured e-Audit for those attributes and that object, then you can query the audit table for the last record to find out which User made the change. Admittedly, it won't tell you how they made the change, but at least you can differentiate between service accounts and real users.

Other than that, I think you would need an autoscript with attribute.action launch points on those attributes that records the current user and whether the session was interactive (i.e. via the Maximo UI or not) in new xychangeby and xychangedinmx attributes on the woserviceaddress object.

Upvotes: 2

Related Questions