Saturday, April 26, 2025

Excel Formulas - Helpful in BIRT Reports

 

  • BIRT reports are widely used in Maximo and sometimes require to build reports with many columns and field mapping.
  • I’ve been using excel formulas to generate scripts for Open, Fetch method
  • These are simple text formulas, yet useful for working with reports with many columns.

Open Method:

To Convert 'Select Query' for Open Method

Enter the SQL query as multiple lines in Excel sheet. Example: column A

Apply the formula in column B as below.

For First row only:

=CONCAT("var sqlText=""",A1,"""")

For other rows:

=CONCAT("+ "" ",A2,"""")

=CONCAT("+ "" ",A3,"""")

=CONCAT("+ "" ",A4,"""")

..

...


Note: The above formula does not add/append the params["where"] or other parameters. Manually edit before using it.



Fetch Method:

To Generate Fetch method field mapping scripts.

Copy the BIRT report dataSet field names to column A in excel sheet

Copy the Select Query Field names from 'Open method' to column B in excel sheet

Enter the formulas in Column C as below to generate Script of Fetch method

=CONCAT("row[""",A2,"""] = maximoDataSet.getString(""",B2,""");")

=CONCAT("row[""",A3,"""] = maximoDataSet.getTimestamp(""",B3,""");")

=CONCAT("row[""",A4,"""] = maximoDataSet.getInteger(""",B4,""");")




Extract 'Select Query' from 'Open Method’ sqlText:

Copy the value of sqlText Variable from Open method to 'A1' cell in column in excel sheet.

Apply the below formula in another cell. This will convert the sqlText to executable query.

=SUBSTITUTE(SUBSTITUTE(A1,"+ """,),"""",)






Saturday, March 22, 2025

Unlock the Maximo Start Center template via SQL

Maximo Start centers are useful to view different types of user data such as Workflow assignments, Result sets and other portals like Favourite applications, Bulletin board etc.

Each Start center is assigned to specific 'Security group' and Users can be granted 'access to edit' the portal themselves.

·    When a user opens the start center template to edit, a record will be inserted in SCCONFIG table with ‘groupnname as NULL’


·      If any other user tries to edit the same template, will get an error message as below.

·   Start center become locked for other user to edit and must wait until the main user Finish/Cancel the changes

·   In case, the main user is not reachable, or intermittently blocked access, it becomes impossible for others to edit.

·   There is a workaround to this by removing the entries in SCCONFIG, LAYOUT and other portal tables such as RSCONFIG, INBXCONFIG etc.


Here are the detailed steps.

1.  Query the SCCONFIG as below and get the layoutid

select scconfigid,* from scconfig (nolock) where sctemplateid=1601 and groupname is null;

2.  Query the SCCONFIG and LAYOUT tables using inner join to fetch related portal details.

select lo.scconfigid,layoutid,portletid,* from scconfig sc

inner join layout lo on sc.scconfigid=lo.scconfigid

where sc.sctemplateid=<>and sc.groupname is null and portletid<>'BBOARD'

Note: Bulletin board is not editable and no table for BBOARD. Hence it is excluded in the results.


Copy the LayoutIDs of each portal table.


 

3.  Generate and Execute the "Deletion Scripts' to remove entries from SCCONFIG, LAYOUT and Other Portal tables by using scconfigidlayoutid copied from above step.

delete from SCCONFIG where sctemplateid=<> and groupname is null and scconfigid=<scconfigid>;
delete from LAYOUT where scconfigid=<scconfigid>;
delete from ACTIONSCFG where layoutid=<layoutid>;
delete from FACONFIG where layoutid=<layoutid>;
delete from RSCONFIG where layoutid=<layoutid>;
delete from RSCONFIG where layoutid=<layoutid>; 
delete from INBXCONFIG where layoutid=<layoutid>;

Execute the script.

    Now, try opening the star center template, it will be editable.


Excel Formulas - Helpful in BIRT Reports

  BIRT reports are widely used in Maximo and sometimes require to build reports with many columns and field mapping. I’ve been using excel f...