Maximo

 View Only
  • 1.  Any Way to Capture the Current Tab User in Automation Script

    Posted Mon October 16, 2023 01:38 PM

    Please suggest if there is any way to retrieve Current TabName in Automation Script. There is a requirement to capture the logs whenever any User opens a Particular Tab.



    ------------------------------
    Pavani Bovilla
    ------------------------------


  • 2.  RE: Any Way to Capture the Current Tab User in Automation Script

    Posted Tue October 17, 2023 04:31 AM

    Hi Pavani,

    Although you can't see it in application designer front end, if you look at the WOTRACK application "Failure Reporting" tab in the XML you'll see there's a way to add an event to clicking on the tab:

    <tab id="failrep" label="Failure Reporting" tabchangeevent="save">

    This can be linked with an action launch point of a script by adding a signature option of the same name to the app and setting the advanced flag to "This is an action that must be invoked by user in the UI". Also need to grant the sig option to your security group too.

    Thanks

    Paul



    ------------------------------
    Paul Irving
    Product Development Manager
    BPD Zenith Ltd
    ------------------------------



  • 3.  RE: Any Way to Capture the Current Tab User in Automation Script

    Posted Tue October 17, 2023 07:08 AM
    Edited by Pavani Bovilla Tue October 17, 2023 07:09 AM


    Thanks a lot Paul. Tried the suggested way by you and it helped me to accomplish my requirement.

    Thanks

    Pavani



    ------------------------------
    Pavani Bovilla
    ------------------------------



  • 4.  RE: Any Way to Capture the Current Tab User in Automation Script

    Posted 2 days ago

    Hi Pavani,

    if you're in MAS Manage then you have one more option to address your requirement using UI Bean Scripting. It still uses this really neat tabchangeevent trick which @Paul Irving suggested but different way of associating automation script. 

    Instead of creating an automation script+action, signature option, glue them together in the application designer and finally grant access to the desired security group(s) it's enough to create APPBEAN.<APP> automation script and define function to handle given event.

    Example setup for PO application might look as follows.

    PO.XML presentation

    [...] <tab id="main" label="PO" type="insert" tabchangeevent="tabchanged"> [...]

    APPBEAN.PO automation script

    def tabchanged(ctx):
      ctx.log('### TAB CHANGED ###')

    That's all it takes.



    ------------------------------
    Andrzej Więcław
    Maximo Technical Consultant
    AFRY
    Wrocław, Poland
    ------------------------------



  • 5.  RE: Any Way to Capture the Current Tab User in Automation Script

    Posted 21 hours ago

    Hi Andrzej,

    Am I right to assume that your solution works in MAS Manage, and Paul's solution would work in Maximo 7.6?

    Thanks for these ideas.

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

    Gaétan Savard

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



    ------------------------------
    Gaétan Savard
    ------------------------------



  • 6.  RE: Any Way to Capture the Current Tab User in Automation Script

    Posted 21 hours ago

    Hi Gaétan,

    not really. Paul's solution works both in Maximo 7.x as well as in MAS Manage.
    UI Bean Scripting is however available only in MAS Manage.



    ------------------------------
    Andrzej Więcław
    Maximo Technical Consultant
    AFRY
    Wrocław, Poland
    ------------------------------



  • 7.  RE: Any Way to Capture the Current Tab User in Automation Script

    Posted 20 hours ago

    Hi Andrzej,

    Thanks a lot for the quick response.

    Pretty sure that's gonna be helpfull someday.



    ------------------------------
    Gaétan Savard
    ------------------------------