Maximo

Expand all | Collapse all

Deleting Reports More than One at a time

  • 1.  Deleting Reports More than One at a time

    Posted 3 days ago
    We have a lot of garbage reports (1000's) in our system and using select action can only delete one at a time.  I added this action so you can use it from the list view and select multiple reports, but it still only deletes a single report at a time.  Is there a way to get it to do multiples?

    Brian

    ------------------------------
    Brian Hobbs
    ------------------------------


  • 2.  RE: Deleting Reports More than One at a time

    Posted 3 days ago
    Are you on a Mac or PC? 

    If you're on a Mac I have a totally cheesy way to do this with Keyboard Maestro. I programmed a macro to move my mouse to certain positions on the screen and then do a mouse click. I added some time delays to account for screen refreshes. Then the macro just repeats itself 'x' number of times. I've been doing about a 100 per batch because that's about how long it takes to get to the breakroom and back.

    ------------------------------
    Jason Verly
    Reliability Engineering Manager
    Agropur US
    Le Sueur MN
    ------------------------------



  • 3.  RE: Deleting Reports More than One at a time

    Posted 3 days ago
    I don't think there's anything special with the delete after a quick glance. The ReportAppBean has a prompt to confirm you want to do it, checks esig (in case esig was configured for that action), and then calls the delete, shows a message, and returns to the list tab. Ultimately though, it seems like it's just calling the delete method on the MBO. 

    I would imagine you could create a cron task automation script that got the reports you wanted to delete in a set and then just called the delete and save events. You probably could also create a MIF import to do it as well.

    ------------------------------
    Steven Shull
    ------------------------------



  • 4.  RE: Deleting Reports More than One at a time

    Posted 2 days ago
    Thanks that helps.

    Brian

    ------------------------------
    Brian Hobbs
    ------------------------------



  • 5.  RE: Deleting Reports More than One at a time

    Posted 3 days ago
    The challenge we've had with the default delete method is the List tab requires a manual refresh - at least in Maximo 7.6.0.x - after each deleted report. Otherwise the deleted report is still showing on the List tab, even after being deleted.

    ------------------------------
    Jason Verly
    Reliability Engineering Manager
    Agropur US
    Le Sueur MN
    ------------------------------



  • 6.  RE: Deleting Reports More than One at a time

    Posted 2 days ago
    I assumed this was more of a one time action which is why I suggested the background approach. If you needed this to occur in bulk frequently, you could do an action automation script in 7.6.1.X and not have to refresh the records. I think you're stuck on 7.6.0.X though since it doesn't have a way to interact with the UI.

    Something like below should give you what you need on 7.6.1.X. This script assumes you are going to have users manually select reports (using the select records) option instead of assuming they want to delete them all. 

    webSession = service.webclientsession()
    resultsBean=webSession.getCurrentApp().getAppBean().getResultsBean()
    reportSet=resultsBean.getMboSet()
    selectedRecords=reportSet.getSelection()
    # This assumes users are selecting specific records
    if selectedRecords:
        iterator=selectedRecords.iterator()
        while iterator.hasNext():
            reportMbo=iterator.next()
            reportMbo.delete()
        reportSet.save()
        resultsBean.reset()​


    If you trust the people with access and want them to just filter down the list tab to the records involved, you could replace the logic with something like below. I would recommend at least doing an interactive prompt though to ensure they intend to do it as recovery will be very difficult otherwise. 

    webSession = service.webclientsession()
    resultsBean=webSession.getCurrentApp().getAppBean().getResultsBean()
    reportSet=resultsBean.getMboSet()
    reportSet.deleteAll()
    reportSet.save()
    resultsBean.reset()​


    ------------------------------
    Steven Shull
    ------------------------------