Maximo Open Forum

 View Only
  • 1.  Placing System Date (Current Date) in a Recurring Report Subject Field (7.6.1.2 SQL Server)

    Posted 03-15-2024 15:44

    Hi,

    Does anyone know of a way to place the system date or current date into the subject line of a recurring report?

    Example: Daily PM Work Order Generation Report - 3/15/24

    I've tried :&DATE: and :DATE and :SYSDATE with no luck.


    #Administration
    #Customizations
    #EndUser
    #Reporting
    #WorkManagement

    ------------------------------
    Stevie Holloway
    Tufts University
    ------------------------------


  • 2.  RE: Placing System Date (Current Date) in a Recurring Report Subject Field (7.6.1.2 SQL Server)

    Posted 03-15-2024 16:11

    Hi Stevie

    Look, These 3 option seem to work from a Communication template and they should work

    :DATE 
    :TIME
    :DATETIME
     
    :date
    :time
    :datetime 
    I hope so. Regards!


    ------------------------------
    Martin Fabra
    Mfsi
    ------------------------------



  • 3.  RE: Placing System Date (Current Date) in a Recurring Report Subject Field (7.6.1.2 SQL Server)

    Posted 03-15-2024 21:04

    Hi Stevie - I hope you are doing well!

    I think that I would try the following, which should provide you the standard bind functionality that you are looking for in your Scheduled Report (for both Subject and Message) using :&DATE&, as an example:

    from psdi.mbo import SqlFormat
    
    def getResolvedField(m, field):
        
        sqlf = SqlFormat(m, m.getString(field))
        sqlf.setIgnoreUnresolved(True)
        return sqlf.resolveContent()
    
    def main():
        
        if interactive:
            return
        
        mbo.setValue("EMAILSUBJECT",  getResolvedField(mbo, "EMAILSUBJECT"))
        mbo.setValue("EMAILCOMMENTS", getResolvedField(mbo, "EMAILCOMMENTS"))
        
    main()

    I created this with an Object Launch Point, on Initialize Value against the REPORTSCHED Object.

    Good luck!



    ------------------------------
    Aaron Paroulek
    Maven Asset Management
    ------------------------------



  • 4.  RE: Placing System Date (Current Date) in a Recurring Report Subject Field (7.6.1.2 SQL Server)

    Posted 03-16-2024 10:26

    Hi Aaron,

    I'm doing well. Thank you. How are you?

    I try this out and report the result. Is this Jython or Python?



    ------------------------------
    Stevie Holloway
    Tufts University
    ------------------------------



  • 5.  RE: Placing System Date (Current Date) in a Recurring Report Subject Field (7.6.1.2 SQL Server)

    Posted 03-17-2024 07:21

    Hi Aaron,

    I took a chance and used Python, and your coding worked perfectly.

    Thanks so much.



    ------------------------------
    Stevie Holloway
    Tufts University
    ------------------------------