Monday, April 11, 2016

Maximo automation script... Jython code similar to string Starts with


from psdi.util.logging import MXLogger
from psdi.util.logging import MXLoggerFactory
from psdi.mbo import MboConstants

logger = MXLoggerFactory.getLogger("maximo.script");
siteVar=str(mbo.getMboValue("SITEID"))
## Below line does action similar to starts with in string. It compares if site variable starts with KSK or not, if it doesnt start it alerts the user
if(siteVar[:len("KSK")] <> "KSK"):
 logger.debug("Site validation")
 errorgroup = "Site"
 errorkey ="Checksite"


ref : Reference Link


----------------------------------------------------------------------------
 All the messagesbelow are just forwarded messages if some one feels hurt about it please add your comments we will remove the post.Host/author is not responsible for these posts.

Monday, March 28, 2016

Dont mess with wives





After 37 years of marriage. Jake dumped his wife for his Young secretary. His new girlfriend demanded that they live in Jake and Edith’s multi million dollar home and since the man’s lawyers were a little better he prevailed. He gave Edith his now ex-wife just 3 days to move out. She spent the 1st day packing her belongings into boxes crates and suitcases. On the 2nd day she had to movers come and collect her things. On the 3rd day she sat down for the last time at their beautiful dining room table by candlelight put on some soft background music and feasted on a pound of shrimp a jar of caviar and a bottle of Chardonnay. When she had finished she went into each and every room and stuffed half-eaten shrimp shells dipped in caviar into the hollow of all of the curtain rods. She then cleaned up the kitchen and left. When the husband returned with his new girlfriend all was bliss for the first few days. Then slowly the house began to smell. They tried everything cleaning mopping and airing the place out. Vents were checked for dead rodents and carpets were cleaned. Air fresheners were hung everywhere. Exterminators were brought in to set off gas canisters during which they had to move out for a few days and in the end they even replaced the expensive wool carpeting. NOTHING WORKED. People stopped coming over to visit. Repairman refused to work in the house. The Maid quit. Finally, they could not take the stench any longer and decided to move. A month later even through they had cut their price in half they could not find a buyer for their stinky house. Word got out and eventually even the local realtors refused to return their calls. Finally they had to borrow a huge sum of money from the bank to purchase a new place. The ex-wife called the man and asked how things were going. He told her the saga of the rotting house. She listened politely and said that she missed her old home terribly and would be willing to reduce her divorce settlement in exchange for getting the house back. Knowing his ex-wife had no idea how bad the smell was… he agreed on a price that was about 1/10th of what the house ha been worth, but only if she were to sign the papers that very day. She agreed and within the hour his lawyers delivered the paperwork. A week later the man and his girlfriend stood smiling as they watched the moving company pack everything to take to their new home. INCLUDING THE CURTAIN RODS. :) -
















----------------------------------------------------------------------------
All the messagesbelow are just forwarded messages if some one feels hurt about it please add your comments we will remove the post.Host/author is not responsible for these posts.

Friday, March 11, 2016

Hameed and his teacher

A small boy named Hameed lived in a village in Morocco. None of his classmates liked him because of his stupidity, especially his teacher, who was always yelling at him "You are driving me crazy Hameed!!!!!"


One day hameed's mother came into school to check on how he was doing. The teacher told his mother honestly, that her son is simply a disaster, getting very low marks and even she had never seen such a dumb boy in her entire teaching career!!!! The mother was shocked at the feedback and withdrew her son from the school & even moved to another town!!!!!




25 years later, the teacher was diagnosed with an incurable cardio disease! All the doctors strongly advised her to have an open heart operation, which only one surgeon could perform.......




Left with no other options, the teacher decided to have the operation, which was successful...... When she opened her eyes after the surgery she saw a handsome doctor smiling down at her! She wanted to thank him, but could not talk. Her face started to turn blue, she raised her hand, trying to tell him something but eventually died!


The doctor was shocked and was trying to work out what went wrong, when he turned around he saw our friend Hameed, working as a cleaner in the clinic, who had unplugged the oxygen equipment to connect his Mobile Charger !!!!!






Don't tell me you thought that Hameed became a doctor???? :D :D

Good Day..Have a great Week ahead :) collapse


----------------------------------------------------------------------------
All the messagesbelow are just forwarded messages if some one feels hurt about it please add your comments we will remove the post.Host/author is not responsible for these posts.

Wednesday, February 24, 2016

Adding messages in processing rules of Enterprise services in Maximo

Below are the steps which are to be followed to make sure messages can be properly added in enterprise services à processing rules.

·         Create an entry in Messages from database configuration making sure that messagegroup value is ‘iface’  example below
o   Message Group :iface
o   Message Key : VALIDATIONALERT
o   Display Method : MSGBOX
o   Value : Alerting user

·         Now navigate to Enterprise services à Processing rules and select this value from lookup attached to Message Key.


----------------------------------------------------------------------------
 All the messages below are just forwarded messages if some one feels hurt about it please add your comments we will remove the post.Host/author is not responsible for these posts.

Friday, February 19, 2016

Fetching last 6 months data in Maximo using SQL Server with output in a specific language

Below is one of the best ways to find number of tickets created in last 6 months in Maximo using SQL Server database in a specific language.
here i am using Portugese as lanuage in which my output should be

Query is self explanatory


select CASE month
WHEN  'January' THEN 'Janeiro de'
WHEN  'February' THEN 'Fevereiro'
WHEN  'March' THEN 'Março de'
WHEN  'April' THEN 'Abril'
WHEN  'May' THEN 'Maio'
WHEN  'June' THEN 'Junho de'
WHEN  'July' THEN 'Julho'
WHEN  'August' THEN 'Agosto'
WHEN  'September' THEN 'Setembro de'
WHEN  'October' THEN 'Outubro'
WHEN  'November' THEN 'Novembro de'
  ELSE 'Dezembro de'
END month,countoftickets from ( SELECT DATENAME(MONTH,DATEADD(month, -5, GETDATE())) month,COUNT(*) AS countoftickets , 1 as fs FROM ticket WHERE MONTH(creationdate) = MONTH(DATEADD(month, -5, GETDATE())) union  SELECT DATENAME(MONTH,DATEADD(month, -4, GETDATE())) month,COUNT(*) AS countoftickets , 2 as fs FROM ticket WHERE MONTH(creationdate) = MONTH(DATEADD(month, -4, GETDATE())) union  SELECT DATENAME(MONTH,DATEADD(month, -3, GETDATE())) month,COUNT(*) AS countoftickets , 3 as fs  FROM ticket WHERE MONTH(creationdate) = MONTH(DATEADD(month, -3, GETDATE())) union  SELECT DATENAME(MONTH,DATEADD(month, -2, GETDATE())) month,COUNT(*) AS countoftickets , 4 as fs  FROM ticket WHERE MONTH(creationdate) = MONTH(DATEADD(month, -2, GETDATE())) union  SELECT DATENAME(MONTH,DATEADD(month, -1, GETDATE())) month,COUNT(*) AS countoftickets , 5 as fs  FROM ticket WHERE MONTH(creationdate) = MONTH(DATEADD(month, -1, GETDATE())) union  SELECT DATENAME(MONTH,DATEADD(month, 0, GETDATE())) month,COUNT(*) AS countoftickets , 6 as fs  FROM ticket WHERE MONTH(creationdate) = MONTH(DATEADD(month, 0, GETDATE()))  ) a1  order by fs

output:

month countoftickets
Setembro de 0
Outubro 0
Novembro de 0
Dezembro de 22
Janeiro de 57
Fevereiro 34






----------------------------------------------------------------------------
All the messagesbelow are just forwarded messages if some one feels hurt about it please add your comments we will remove the post.Host/author is not responsible for these posts.

Thursday, February 18, 2016

Displaying data ticket count with in SLA by priority in MAXIMO using SQL Server.

Below query can be used for displaying data ticket count with in SLA by priority in MAXIMO using SQL Server.

Data would be displayed like below

Priority          Count Status
1                 1        SLA OK
1                   2        SLA NOT OK
3                  15      SLA OK


Query :

select internalpriority,count(*) count, 'SLA NOT OK'  status  from TICKET where targetcontactdate is not null and actualcontactdate is not null and targetcontactdate - actualcontactdate <0 -="" actualcontactdate="" and="" by="" count="" from="" group="" internalpriority="" is="" nbsp="" not="" null="" ok="" select="" status="" targetcontactdate="" ticket="" union="" where="">=0 group by internalpriority










----------------------------------------------------------------------------
All the messagesbelow are just forwarded messages if some one feels hurt about it please add your comments we will remove the post.Host/author is not responsible for these posts.

Display Number of tickets solved with in SLA by person in Maximo .. SQL Server

Below query can be used for displaying data solved with in SLA by person in MAXIMO using SQL Server.

Data would be displayed like below

AffectedPerson Count Status
ABC                   1        SLA OK
ABC                   2        SLA NOT OK
XYZ                   15      SLA OK


Query :

select affectedperson,count(*) count, 'SLA NOT OK'  status  from TICKET where targetcontactdate is not null and actualcontactdate is not null and targetcontactdate - actualcontactdate <0 -="" actualcontactdate="" affectedperson="" and="" by="" count="" from="" group="" is="" nbsp="" not="" null="" ok="" select="" status="" targetcontactdate="" ticket="" union="" where="">=0 group by affectedperson







----------------------------------------------------------------------------
All the messagesbelow are just forwarded messages if some one feels hurt about it please add your comments we will remove the post.Host/author is not responsible for these posts.

Tuesday, February 16, 2016

Displaying tickets created from different sources in Maximo using Sql Server

Below query can be used to display number of tickets which are created from different sources(here external systems) as per months.

Output would be like below

Source  Month count
Email    Dec       10
Email     Jan        14
Phone    Jan         15
self Serv  Dec      05

Query:

select externalsystem,DATENAME(MONTH,DATEADD(month, 0, creationdate)) month ,count(*) count  from TICKET  group by externalsystem , DATENAME(MONTH,DATEADD(month, 0, creationdate))








---------------------------------------------------------------------------- All the messagesbelow are just forwarded messages if some one feels hurt about it please add your comments we will remove the post.Host/author is not responsible for these posts.

Sunday, February 7, 2016

Fetching Last 6 months data in SQL Server for Maximo

Below is one of the best ways to find number of tickets created in last 6 months in Maximo using SQL Server database.

Query is self explanatory

select month,countoftickets from (
SELECT DATENAME(MONTH,DATEADD(month, -5, GETDATE())) month,COUNT(*) AS countoftickets , 1 as fs FROM ticket WHERE MONTH(creationdate) = MONTH(DATEADD(month, -5, GETDATE())) union
SELECT DATENAME(MONTH,DATEADD(month, -4, GETDATE())) month,COUNT(*) AS countoftickets , 2 as fs FROM ticket WHERE MONTH(creationdate) = MONTH(DATEADD(month, -4, GETDATE())) union
SELECT DATENAME(MONTH,DATEADD(month, -3, GETDATE())) month,COUNT(*) AS countoftickets , 3 as fs  FROM ticket WHERE MONTH(creationdate) = MONTH(DATEADD(month, -3, GETDATE())) union
SELECT DATENAME(MONTH,DATEADD(month, -2, GETDATE())) month,COUNT(*) AS countoftickets , 4 as fs  FROM ticket WHERE MONTH(creationdate) = MONTH(DATEADD(month, -2, GETDATE())) union
SELECT DATENAME(MONTH,DATEADD(month, -1, GETDATE())) month,COUNT(*) AS countoftickets , 5 as fs  FROM ticket WHERE MONTH(creationdate) = MONTH(DATEADD(month, -1, GETDATE())) union
SELECT DATENAME(MONTH,DATEADD(month, 0, GETDATE())) month,COUNT(*) AS countoftickets , 6 as fs  FROM ticket WHERE MONTH(creationdate) = MONTH(DATEADD(month, 0, GETDATE()))  ) a1
order by fs

output:

Month   Countoftickets
October 10
November 12
December   5
January   17
February 20
March 15











---------------------------------------------------------------------------- All the messagesbelow are just forwarded messages if some one feels hurt about it please add your comments we will remove the post.Host/author is not responsible for these posts.

Monday, January 18, 2016

Enable Workflow reassignments in Maximo based on security groups

1.       Simple way to enable workflow reassignments in application is through Signature options and security group.
2.       Navigate to any application in which you need Workflow reassignment option thorough application designer. In this case I am taking Requests and Defects (Oil) -- PLUSGDEF
3.       From select action add a sig option called ‘MAXWFRA’ with a  simple desc and save the record.



4.       Now navigate to the security group for which this access  has to be enabled and check the sigoption under the application (PLUSGDEF).

5.       After signing out and signing in as a user from that security group ,When you navigate to Requests and Defects (Oil) application and select a record with an active workflow . Observe that Reassignments icon is visible.









----------------------------------------------------------------------------
 All the messagesbelow are just forwarded messages if some one feels hurt about it please add your comments we will remove the post.Host/author is not responsible for these posts.

Wednesday, January 6, 2016

How to wrap attributes in Birt based on space.


In the attribute which you want to wrap add the following code which wraps after every space to next line

if(dataSetRow["description"]!=null){
  dataSetRow["description "].replace(/ /g,"\n")
 }


/ /g à means white space anywhere in the string

----------------------------------------------------------------------------

All the messagesbelow are just forwarded messages if some one feels hurt about it please add your comments we will remove the post.Host/author is not responsible for these posts.