1

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:

  • Automatically from the service address (linked to a GIS feature class).
  • Manually by a user (by right-clicking on the map and clicking Set record location).

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)

User1974
  • 276
  • 1
  • 17
  • 63

2 Answers2

2

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.

Preacher
  • 2,127
  • 1
  • 11
  • 25
1

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).

User1974
  • 276
  • 1
  • 17
  • 63
  • 1
    `if sa is not None and sa != "" and x > 0:` smells a lot of Java. Python lets you simplify it to `if sa and x > 0:`. It's one of the things I really like about Python/Jython. – Preacher Jan 10 '20 at 15:13
  • @Preacher: I took your recommendation. Thanks. Answer updated. – User1974 Jan 12 '20 at 22:07