Showing posts with label Maximo 7.6.1.1. Show all posts
Showing posts with label Maximo 7.6.1.1. Show all posts

Thursday, 30 June 2022

Maximo Attachment File Size

 Below is the script to calculate the Attachment size in Maximo. The File class is used to get the File details and Length() method is used to capture the size details.

from java.io import File 

path = mbo.getString("DOCLINKS.DOCINFO.URLNAME")
print("The Path Value:",path)
if (path):
	file =  File(path)
	print("The Size of the File in Bytes",file.length())
	print("The Size of the File in MB",file.length()/1024)
	print("The Size of the File in GB",file.length()/(1024 * 1024))
Below is the output captured in the system logs.
[6/30/22 8:01:53:951 EDT] 000000e2 SystemOut     O 30 Jun 2022 08:01:53:951 [INFO] [MXServer] [] ('The Path Value:', u'c:\\DOCLINKS\\ATTACHMENTS\\Maximo-access-via-Published-Service-in-your-local-laptop-browser.docx')
('The Size of the File in Bytes', 543667L)
('The Size of the File in MB', 530L)
('The Size of the File in GB', 0L)

Thursday, 24 October 2019

Result set is showing Current Date when the actual value is null


After Upgrading Maximo from 7.1 to 7.6.1.1 we had an issue with Maximo Result set, Empty Date fields are filled up with the current Date.
Below is the fix applied to resolve it.

Find resultsetportlet.jsp file

#WebSphere_Root/webclient/components/resultsetportlet.jsp

Search for "type==MXFormat.DATE" and change the if clause to below,

if ((type==MXFormat.DATE || type==MXFormat.DATETIME ) && finalData !=null && finalData.trim().length()>0)
Now you can see that Empty Date fields showing blank in Result Set