Thursday, 12 September 2019

Top N rows in a group by using row_number function | SQL

Let say I have this below data in my table for instance:



and my desired output is as below: Group it by WONUM but also I want to see the 2 records of each group.


Sunday, 8 September 2019

Create a Custom Dialog and Save Values in Custom Object | IBM Maximo

 A requirement is to have a custom dialog box which will be called by Select Action or from workflow during status change for instance:

Below is the simplest workaround by creating a non-persisten attribute in primary object and use it in dialog then run your automation on it and do your logic to store/insert.

Step by step is as beLow:

1. add non persistent attribute in pr ojbect (NP_STATUSMEMO)
2. pr to pojust relationship: ownerid = :prnum and object='PR'
3. add signature: MYDIALOG and grant to maxeveryone
4. add actio menu and attach signature MYDIALOG as option
5. DIALOG IN pr.xml attached below, add required fields to display
6. write ALP for this attribute validate with below jython