Thanks
@Steven Shull @Steven ShullFollowing on from that, I have the following code to clear the assetnum, when its auto-populated by Location (when there is a 1:1 relationship).
This runs on 'Run Action' on attribute LOCATION of SR object.
Its working OK in that scenario.
However, its also getting triggered when an assetnum is manually entered on screen, and the location is auto-populated.
Is there a way we could prevent this second scenario?
from psdi.mbo import MboConstants
locationSet = mbo.getMboSet('LOCATION')
location = locationSet.getMbo(0)
if location is not None:
locSysID = location.getString('SYSTEMID')
if (locSysID == "TSN"):
mbo.setValueNull("ASSETNUM",MboConstants.NOACCESSCHECK | MboConstants.NOVALIDATION_AND_NOACTION)
@Alex Walter @Jason Uppenborn Any thoughts on this one?
------------------------------
KKunnuthara
------------------------------
Original Message:
Sent: Fri September 10, 2021 09:00 AM
From: Steven Shull
Subject: Field auto-populated vs manually entered
I'm not sure it's 100% reliable but what I've done is check that ASSETNUM is set and that the location on the asset (by getting ASSET.LOCATION) matches the location on the SR. In those cases I assume it's set by the asset. Any other change to the location field I assume is set by the user.
------------------------------
Steven Shull
Original Message:
Sent: Thu September 09, 2021 12:18 AM
From: KKunnuthara
Subject: Field auto-populated vs manually entered
Hi guys,
I am on the SR application.
Is there a way by which I can differentiate a
LOCATION field value auto-populated by ASSETNUM (Assuming 1:1 relationship),
and a LOCATION value that I manually entered.
Both scenarios while being on the screen (isInteractive() = true).
Basically, I want to use this differentiation in an automation script.
------------------------------
KKunnuthara
------------------------------
#Maximo
#AssetandFacilitiesManagement