Hi Alexey,
You would be better doing this in the Anywhere configuration as opposed to an Automation script in core Maximo.
I have not tried to do this in our own demo system but looks like in the WorkExecution app the async_valLoccheckLocationFound method in the WODetailHandler.js is where you would need to implement this.
It already sets the location if an Asset is selected first so using a similar way you would need to put new code in to fetch the count of assets for the selected location and if equal to 1 then set the asset value.
Using this method would mean the user of the Anywhere application would be able to see the returned asset number.
I hope this helps, if you need more information then please let me know and will see if we can get this working in our system and send you the code.
------------------------------
Steve Lee
IBM AI Applications
Maximo Solution Engineer
Leeds
------------------------------
Original Message:
Sent: Tue September 15, 2020 10:05 PM
From: Alexey Potanin
Subject: Anywhere 764 Technician - Populate Asset automatically from Location
Anywhere 7.6.4
Application: Technician
Process: WO creation
Maximo has a nice feature where it populates an Asset Number field on selecting a location that has only one asset.
Unfortunately Work Technician application does not do this by default.
Did I miss some configuration?
Or I have to do it myself (e.g. create an automation script in Maximo to do it)?
Our site is using location field primarily and rarely populates Asset manually (for work management). So having it done automatically is very handy :)
Thank you for your advice!
Regards,
Alexey
------------------------------
Alexey Potanin
------------------------------
#Maximo
#AssetandFacilitiesManagement
#MaximoAnywhere