This is based on an automation script variable being declared and being bound to an attribute based on synonymdomain. I did a quick test with a launch point on WORKORDER SAVE and confirmed that if I setup a variable (status in this case) and bound that variable to the STATUS attribute that when I referenced status_internal I got the internal value. It's possible there are issues with certain launch points (if so please let me know what your launch point is and I'll try it out).
Somewhat annoyingly, if you have a script launch point on an attribute, there are a few special variables that you can access but none that return the internal value. For example, there is an attributename_initial or attributename_previous, or you can use things like thisvalue_readonly or thisvalue_required to adjust the edit rules.
We don't typically use variables, and it's a little verbose, but it's not too bad to get the internal value just using code. Especially in the case of status because stateful mbos like WORKORDER have a function called getInternalStatus() so you can call mbo.getInternalStatus() and get the internal value.
------------------------------
Steven Shull
Director of Development
Projetech Inc
Cincinnati OH
------------------------------
Original Message:
Sent: Fri May 29, 2020 10:37 AM
From: Robert Goff
Subject: Autoscript Implicit Variable Missing?
According to https://www.ibm.com/support/knowledgecenter/SSLKT6_7.6.0/com.ibm.mt.doc/autoscript/r_variables_automation_scripts.html
Table 2. Implicit variables that are used with a primary variable in automation scripts| Implicit variable | Type | Scope | Description |
|---|
| | | |
| var_internal | The same type as the MBO attribute that the variable binds to. | All launch points | Provides the internal value for an SYNONYMDOMAIN entry. If the primary variable is associated with a MBO attribute that is associated with a synonym domain, the var_internal implicit variable provides the corresponding internal value for the attribute. The var_internal variable is passed to the script. The script cannot modify the var_internal variable. |
There should be an implicit variable for a variable bound to a domain-based attribute that returns the synonym internal value, but I haven't been able to find it. Can anyone give me an example of how this works? Thanks.
Edit: Actually, what I can't find specifically is status_internal for WORKORDER; I did find the _internal variable for other domain-connected attributes.
------------------------------
Robert Goff
------------------------------
#AssetandFacilitiesManagement
#Maximo
#MaximoIntegrationandScripting