Maximo

 View Only
Expand all | Collapse all

add two field in dialog windows Generate New Assets

  • 1.  add two field in dialog windows Generate New Assets

    Posted 4 days ago

    Hello, I added two fields in the dialog box to generate news assets.

    The issue is that these two fields are not saved when creating the assets.

    How could I solve this part?



    ------------------------------
    Adolfo Angel Garcia Martinez
    ------------------------------



  • 2.  RE: add two field in dialog windows Generate New Assets

    IBM Champion
    Posted 4 days ago

    Hi Adolfo,

    It would be helpful to be more explicit about which dialog box and in which application you want to achieve this action (could be asset templates, receiving new assets from a purchase order, etc.). If I know which application you are using to create the new assets, then I can find out which MBO's and relationships are "touched".  Normally it can be established by using a new crossover domain or extend an  existing crossover domain to "copy" the new added attribute values into the new created asset record.

    Reagrds,



    ------------------------------
    Jan-Willem Steur
    Manager Business Development
    ZNAPZ b.v.
    Breda
    +31 6 25639950
    Jan-Willem
    ------------------------------



  • 3.  RE: add two field in dialog windows Generate New Assets

    Posted 3 days ago

    hi 

    This is the dialog window

    What I'm trying to do is add the description and aseettype fields and copy this information to the new generated assets.
    I added the description and aseettype fields to the non-persistent PLUSCPREGENASSET table. How could I do a cross-domain or something so that the fields are passed to the new generated assets?

    regards



    ------------------------------
    Adolfo Angel Garcia Martinez
    ------------------------------



  • 4.  RE: add two field in dialog windows Generate New Assets

    IBM Champion
    Posted 3 days ago

    Hi Adolfo,

    You don't need the fields in the Generate New Assets dialog. In the main page of the Asset Template there is a field for Asset Description and Asset Type in the Details section. Just enter your values there and the data will be copied to your new assets. All the fields you see on the main page are copied to the new assets.

    Regards - Andrew



    ------------------------------
    Andrew Jeffery
    Maximo SME
    ZNAPZ b.v
    Barnstaple
    0777 1847873
    ------------------------------



  • 5.  RE: add two field in dialog windows Generate New Assets

    Posted 3 days ago

    Hi, that's correct, but it copies the same information to each asset. What I'm looking for is a way to generate the asset but with different information.
    In each record I'll show you an example.
     
    Each new asset generated must have a different description and a different asset type.



    ------------------------------
    Adolfo Angel Garcia Martinez
    ------------------------------



  • 6.  RE: add two field in dialog windows Generate New Assets

    IBM Champion
    Posted 3 days ago

    Ah I see now what you are trying. An unusual use of Asset Templates, sounds as if an Application Import of assets would be better, or use the Insert action in the Assets application itself.

    But to answer your question, it definitely needs to be scripted or Java coded as you are working in a non-persistent object. I'm not the person for that so I'll leave it to others.



    ------------------------------
    Andrew Jeffery
    Maximo SME
    ZNAPZ b.v
    Barnstaple
    0777 1847873
    ------------------------------



  • 7.  RE: add two field in dialog windows Generate New Assets

    IBM Champion
    Posted 2 days ago

    Hi Adolfo,

    I think there is confusion interpreting what the asset template does/is.

    I have a bunch of assets that need to be created in Maximo.  Usually, they fall into some sort of grouping i.e. asset type, specifications, item numbers and any combo of that.  The template is used to then generate those assets as you're not importing via a PO using a rotating item instead.

    I have 10 pumps, I will end up creating 10 pumps. I use one asset template.  Now what if the 5 are centrifugal and 5 and reciprocal?  Well, I need two asset templates as they will have different specifications.  I have the specification designed to generate the asset's description, therefore on the asset template I leave that field blank.  That is an advantage of using the classifications.

    In your words, you say that they all need to have different descriptions.  That is not the purpose of a template.  The template is the 'image' of an asset that I would like to copy.  Once I have made the copies, then I can change things, but again why?

    Let's roll back to the pumps. Of the 5 reciprocating pumps, 3 have a flow rate of 3 gallons/min, and 2 at 5 gallons/min.  This means that I need yet another asset template.  Now, I have up to 3 asset templates, all pumps (asset type), but based on the specification and virtually different.

    This table shows you the result.

    Asset # Description Asset Type Classification Path
    21787232 Centrifugal Pump, 10 GPM Flow Rate PUMP Pump \ Centrifugal
    21787233 Centrifugal Pump, 10 GPM Flow Rate PUMP Pump \ Centrifugal
    21787234 Centrifugal Pump, 10 GPM Flow Rate PUMP Pump \ Centrifugal
    21787235 Centrifugal Pump, 10 GPM Flow Rate PUMP Pump \ Centrifugal
    21787236 Centrifugal Pump, 10 GPM Flow Rate PUMP Pump \ Centrifugal
    21787237 Reciprocating Pump, 3 GPM Flow Rate PUMP Pump \ Reciprocating
    21787238 Reciprocating Pump, 3 GPM Flow Rate PUMP Pump \ Reciprocating
    21787239 Reciprocating Pump, 3 GPM Flow Rate PUMP Pump \ Reciprocating
    21787240 Reciprocating Pump, 5 GPM Flow Rate PUMP Pump \ Reciprocating
    21787241 Reciprocating Pump, 5 GPM Flow Rate PUMP Pump \ Reciprocating

    There is one major flaw with asset templates.  You cannot assign a rotating item.  This has several impacts down the chain, especially when reordering for replacements, searching for common assets (save for the classification, if used), any PMs.

    You could say that the PM's are taken care of by the use of the Master PM's, but another flaw is that these are not automatically created except when you receive a rotating item linked on a Master PM.  For asset templates, you do not need the master PM to have an item.  It seems that whoever developed the asset template did not take into account rotating items.

    With that information in our head, let's revisit once more your comment "generate the asset but with different information."  I stand by my question Why?  Has this given you some thought, change it, answered it?  Let us know. 

    The community is here is help, but there are times we all need more context.  Can I encourage everyone to add just that bit more detail because you know your requirements and business process, we don't.  We do have a good idea of how Maximo fits together.



    ------------------------------
    Regards, Craig Kokay
    Principle Consultant, COSOL
    https://cosol.global/

    Ph: +61-411-682-040
    email: craig.kokay@cosol.global
    #IBMChampion
    ------------------------------



  • 8.  RE: add two field in dialog windows Generate New Assets

    IBM Champion
    Posted 2 days ago

    Hi Craig - Asset Templates started out as part of Calibration where I believe support for Rotating Items was provided, that is why you will find ITEMNUM, ITEMSETID and ITEMTYPE in the PLUSCTEMPLATE application. When Calibration was brought into the core these fields were hidden, so easy to enable them.

    The issue is that the only fields that do not get copied are these three fields, if the field names align between PLUSCTEMPLATE and ASSET the fields are copied and updated. You can use a crossover domain on ASSET.TEMPLATEID and you can then create rotating assets.

    You can review this article/YouTube video https://maximosecrets.com/2022/07/29/asset-templates-2/

    I did create an Idea - https://ibm-ai-apps.ideas.ibm.com/ideas/MASM-I-874 

    18 months ago it was not under consideration (because of my workaround). It looks like there is a few Asset Template Ideas - but this needs more than 3 votes to gain traction. I thinking marking something as Not Under Consideration generally kills off the idea but I've asked for IBM to reconsider. The big use case is how do you populate assets when you decide to turn an item into a rotating item, the manual method sucks, asset templates with rotating item solves the problem.

    Regards - Andrew



    ------------------------------
    Andrew Jeffery
    Maximo SME
    ZNAPZ b.v
    Barnstaple
    0777 1847873
    ------------------------------



  • 9.  RE: add two field in dialog windows Generate New Assets

    IBM Champion
    Posted 2 days ago

    Hi Andrew,

    I'm glad that you agree that the rotating element is something that needs to be standard.  Thank you for pointing out a simple solution too.  I have added my vote to the Idea!



    ------------------------------
    Regards, Craig Kokay
    Principle Consultant, COSOL
    https://cosol.global/

    Ph: +61-411-682-040
    email: craig.kokay@cosol.global
    #IBMChampion
    ------------------------------



  • 10.  RE: add two field in dialog windows Generate New Assets

    Posted 2 days ago

    hi 

    Could it be done with code and if you have an example I am doing this but when generating the assets it is not executed

    #MT_GENERA_ASSET
    from psdi.server import MXServer
    from psdi.mbo import MboConstants
    # Este script se ejecutará en el evento 'Add' o 'Save' del objeto ASSET
     
    # Obtener el MboSet de PLUSCPREGENASSET (tabla no persistente)
    pluscpregenassetSet = mbo.getMboSet("$PLUSCPREGENASSETSET", "PLUSCPREGENASSET")
     
    # Iterar sobre los registros en PLUSCPREGENASSET
    if not pluscpregenassetSet.isEmpty():
        pluscpregenassetMbo = pluscpregenassetSet.moveFirst()
        while pluscpregenassetMbo is not None:
            print(pluscpregenassetMbo.getString("ASSETNUM"))
            print(pluscpregenassetMbo.getString("ASSETTYPE"))
            # Obtener los valores de los campos en PLUSCPREGENASSET
            #newField1Value = pluscpregenassetMbo.getString("NEWFIELD1")  # Reemplaza con el nombre real del campo
            newField2Value = pluscpregenassetMbo.getString("ASSETTYPE")  # Reemplaza con el nombre real del campo
            
            # Transferir los valores a los campos correspondientes en ASSET
            #mbo.setValue("ASSETTYPE", newField1Value, mbo.NOACCESSCHECK)  # Reemplaza con el nombre real del campo
            mbo.setValue("ASSETTYPE", 'FL', mbo.NOACCESSCHECK)  # Reemplaza con el nombre real del campo
     
            # Mover al siguiente registro en PLUSCPREGENASSET
            pluscpregenassetMbo = pluscpregenassetSet.moveNext()
     
    # Guardar los cambios en el MboSet de ASSET
    mbo.getThisMboSet().save()
     
    # Cerrar el MboSet de PLUSCPREGENASSET
    pluscpregenassetSet.close()
     
     
    ASSETDESCRIPTION
    ASSETTYPE


    ------------------------------
    Adolfo Angel Garcia Martinez
    ------------------------------



  • 11.  RE: add two field in dialog windows Generate New Assets

    IBM Champion
    Posted 4 days ago

    Hi Adolfo,

    I am presuming you are in the Asset Templates application, if not then you can ignore my reply.

    The Asset Templates has a very nice design feature where if you align the attributes in the PLUSCTEMPLATE and ASSET objects then any fields (except ITEMNUM) are copied over from the asset template to the asset. This feature not only supports creation of assets but also the update of those assets.

    For ITEMNUM and any other fields that you cannot align (which will be a pity) you can add a crossover domain to the TEMPLATEID field to copy the data, but this only works during the creation of the assets not during update.

    I did a video on Asset Templates which from memory has these details - https://maximosecrets.com/2022/07/29/asset-templates-2/

    Regards - Andrew



    ------------------------------
    Andrew Jeffery
    Maximo SME
    ZNAPZ b.v
    Barnstaple
    0777 1847873
    ------------------------------