I'm trying to break down this problem into manageable parts: Maximo spatial query.
I think the first step is to create an automation script that does this:
- Takes a value from a field
- Does something with it
- Returns a value to a different field
For example:
- Create a new work order
- Manually enter the
WONUM
as1
- Save
- The action of saving automatically triggers an automation script
- The script checks to see if the
WONUM = 1
- If true, then the
DESCRIPTION
is populated with the wordone
How can I do this?
(Maximo 7.6.1.1)
Swaroop
Use the below code to set the DESCRIPTION
to one when WONUM
is set to 1.
Launch Point Details:
- Launch Point Type: Object Launch Point
- Object:
WORKORDER
- Event: Save
- Save: Add (Before Save)
Python Code:
from psdi.mbo import MboConstants
wonum = mbo.getString("WONUM")
if wonum == "1":
mbo.setValue("DESCRIPTION","one",MboConstants.NOACCESSCHECK)
I hope this answers your question!
来源:https://stackoverflow.com/questions/57383279/automation-script-if-fielda-1-then-set-fieldb-to-one