One of the most frustrating tasks I've had over the years as a Maximo administrator is cleaning up records for an employee that has separated from the company. It's frustrating because the call/ticket I will likely receive from a Maximo user is asking about how to work around an error message like this when changing the employee's Person record from ACTIVE to INACTIVE:
Searching IBM Support, you can find a couple of documents on what a Maximo user needs to do to inactivate a Person record:
- Changing Person Record to Inactive (ibm.com)
- Error After Changing Person Status to INACTIVE (ibm.com)
- Unable to Deactivate a Person (ibm.com)
And it's the last suggested support page that is the most annoying.
Why? Because a Maximo user will normally recognize that the previous employee can't be on an active record and they did their due diligence to remove the previous employee. But when they do a search on the employee, the Maximo user will see the previous employee is still listed on historical copies of a record - e.g. a Job Plan.
From the out of the box Maximo UI, there is no way for a Maximo user to update a REVISED Job Plan, so now a Maximo administrator will have to get involved with this.
Back end scripting to the rescue
The work around is the Maximo/SQL1 administrator has to remove the previous employee
PERSONID from some of the historical records so the Person record can be set to Inactive. The challenge most administrators will find is that this issue can occur on several fields in Maximo:
- Supervisor on Job Plans
- Lead on Job Plans
- Planned Labor on Job Plans2
Over the years I've come up with a SQL script to clear out where a Person record could be used from sources that will prevent a Person record being inactivated.
One caveat to this script: In the script I've created, the Person record that you are trying to inactivated will be set to a NULL value in the various fields. Some organizations have made the related Person field a required field. For example the
JOBPLAN.SUPERVISOR field on may be a required field. This script will set the value for
NULL. The next time a PM attempts to use that Job Plan, the PM WO Gen will error out because a required field is now blank.
SQL Script to remove Person fields:
declare @emp_id char(20)
set @emp_id ='WAYNEB01'
delete joblabor where laborcode = @emp_id and exists(select null from jobplan where jpnum=joblabor.jpnum and jobplanid=jobplan.jobplanid and status='ACTIVE')
delete joblabor where laborcode = @emp_id and exists(select null from jobplan where jpnum=joblabor.jpnum and jobplanid=jobplan.jobplanid and status='INACTIVE')
delete joblabor where laborcode = @emp_id and exists(select null from jobplan where jpnum=joblabor.jpnum and jobplanid=jobplan.jobplanid and status='REVISED')
update jobplan set supervisor = null where supervisor = @emp_id and status='REVISED'
update jobplan set supervisor = null where supervisor = @emp_id and status='INACTIVE'
update jobplan set supervisor = null where supervisor = @emp_id and status='ACTIVE'
update jobplan set laborcode = null where laborcode = @emp_id and status='REVISED'
update jobplan set laborcode = null where laborcode = @emp_id and status='INACTIVE'
update jobplan set laborcode = null where laborcode = @emp_id and status='ACTIVE'
update pm set lead = null where lead = @emp_id
update pm set supervisor = null where supervisor = @emp_id
delete from persongroupteam where respparty = @emp_id
The script will remove the Person record from:
- Supervisor on all Job Plans
- Lead on all Job Plans
- Planned Labor on all Job Plans
- Supervisor on all PM's
- Lead on all PM's
- Remove Person from all Person Groups
After the script is run, all restricted fields should have been cleared with the employee's Person record. Maximo may3 give other error messages when attempting to set the Person record to INACTIVE. Likely those will be active transactional records (e.g. open work orders) that will have to migrate through their lifecycle until the transactional records are closed.
At this point, the Person record can be set to INACTIVE.
New Microsoft Windows App for macOS
Microsoft announced a new Windows App yesterday. This kind of announcement normally doesn't send shock waves in the Apple community until you get an explanation on what the app really is.
Windows App is your gateway to Azure Virtual Desktop, Windows 365, Microsoft Dev Box, Remote Desktop Services, and remote …
Using Dictation in iOS Shortcuts
One of the features I was looking forward to the most with the iPhone 15 Pro has been the one I've taken advantage the least... the Action Button. The idea of having an assignable button on my digital assistant seemed like the perfect feature. So after getting my iPhone I …
Migrating legacy text into Maximo Long Descriptions
One of the trickier tasks a Maximo administrator will run into is migrating information from a legacy system into Maximo. And one of the trickiest migrations can be importing long text notes from a legacy system into Maximo's Long Description fields. When I have to migrate information into Maximo, understanding …
Add Spacers to your macOS menu dock
I've been able to convert a few more friends and family members to the Apple family. So I'm starting to get more questions on customizing their Apple device. One of my favorite customizations is adding spacers into my dock to help separate apps that I keep in my dock. So …
Maximo Automation Script on Duplicate Records
One of the frustrations I always have with Maximo is knowing something I want to do can be done, but not having the technical skills to cross the finish line. Automation Scripting continues to be in that category for me. This week I was asked by a couple of users …