MxLoader

 View Only
Expand all | Collapse all

Unable to populate DOCLINKS.DOCUMENT field with the correct value

  • 1.  Unable to populate DOCLINKS.DOCUMENT field with the correct value

    Posted 09-27-2024 12:01

    I am trying to use MxLoader to add in an attachment via doclinks to a number for assets. I update the following fields and the update works 

    DOCLINKS.DOCUMENT = TESTNAME

    SITEID

    ASSETNUM

    DOCLINKS.DOCUMENT

    DOCLINKS.DOCTYPE

    DOCLINKS.DESCRIPTION

    DOCLINKS.URLNAME

    However every time I do it the document name always gets overridden with a sequential value. There are no duplicates in the doclinks table To cause Maximo to autogenerate a number for this field. Also if I use MXloader to update the doclinks table with the same info it actually works. Its only when I try the update via the asset table in MxLoader that this happens.

    It also works without an issue if I do it in the Maximo UI.

    I looked at the object structure and DB relationships and application designer but I cant find out why this is happening. Can anyone help or have you see this before.



    ------------------------------
    Andrew Brown

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


  • 2.  RE: Unable to populate DOCLINKS.DOCUMENT field with the correct value

    Posted 09-30-2024 08:32
      |   view attached

    Hi Andrew,

    We do the same thing you do and do not have any issues. Attached is our template.



    ------------------------------
    Adam Ames
    Kwik Trip, Inc.
    ------------------------------

    Attachment(s)



  • 3.  RE: Unable to populate DOCLINKS.DOCUMENT field with the correct value

    Posted 10-02-2024 07:06

    Hi Adam,

    That was a typo on my side. I had verified the data in the two tables in the DB prior to the post and that's what made it even more confusing. The attachment is in the Doclinks table and I can see it in the DB. However I did enter OPS USA as the document name but when the Txn committed to the DB it was entered as 157770. I know that Maximo can overwrite info and use a sequential number so as to avoid duplicates etc. but I checked and there is no other enter with the same name so no need for it to do that.  

     

    If I update the DOCLINS table directly via MxLoader as I know the ownerid for  the asset then the correct value gets entered. The same can be said if I do the update via the Asset Portlet in Maximo. So its only when I try the update from the Asset table via MxLoader that the value gets changed.

    I do have an object structure between the two tables



    ------------------------------
    Andrew Brown

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



  • 4.  RE: Unable to populate DOCLINKS.DOCUMENT field with the correct value

    Posted 09-30-2024 08:41

    I used these fields for mine.

    My object structure:



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



  • 5.  RE: Unable to populate DOCLINKS.DOCUMENT field with the correct value

    Posted 09-30-2024 10:50

    Hi Adam & Stevie,

    Thank you for responding, Adam I cannot open you excel attachment so I couldn't see your data.

    Stevie the Data that I have in my Object Structure 

     is the same and the fields that I am using are pretty much the same also. Just no matter what I put in it will always update the data but instead it will always auto generate a number and assign that.

    Sample Input


    View attachments on the UI


    One other side note is that when I query the asset after the update I cant see the doclink info. 


    Instead I need to query the doclinks table in MxLoader in order to view and verify the update.



    ------------------------------
    andrew brown
    Intel
    ------------------------------



  • 6.  RE: Unable to populate DOCLINKS.DOCUMENT field with the correct value

    Posted 09-30-2024 18:46
      |   view attached

    Hi @andrew brown!

    Something I can't understand or it's not clear to me.
     
    You insert a document to the  ASSETNUM 'F150'. But then you query for another asset.. ASSETNUM = 'F15-PMP115-1-00'. Are they the same asset?
     
    If you need to check, run by DB: select * from maximo.doclinks where ownertable = 'ASSET' and ownerid in (select assetuid from maximo.asset where assetnum = 'F150') or looking more simply at the asset app and you will see if the attached document is there or not.
     
    The structure you must create is new (at least, it is not there by default) and as you will see in the comments, it must be mainly about ASSET and then towards DOCLINKS through the DOCLINKS relationship). 
    If you are having problems importing with MxLoader, you can use that same structure from the "Export" option in the ASSET application and see its complete structure to understand if you are missing any data.
    Here I am sending you the complete structure in csv that I am using.
    Regards!


    ------------------------------
    Martin Fabra
    ARSAT S.A. - Actively seeking employment
    ------------------------------

    Attachment(s)



  • 7.  RE: Unable to populate DOCLINKS.DOCUMENT field with the correct value

    Posted 09-30-2024 10:50

    Hi Stevie and Adam,

    Thanks a mil for responding.

    My Object structure is the same and the fields that I am using are pretty much the same also. Just no matter what I put in it will always update the data but instead it will always auto generate a number and assign that.

    Sample Input

    image.png

    View attachments on the UI

    image.png

    One other side note is that when I query the asset after the update I cant see the doclink info. 

    image.png

    Instead I need to query the doclinks table in MxLoader in order to view and verify the update.

    Adam side note but I cant open your attachment, it seems corrupted.






  • 8.  RE: Unable to populate DOCLINKS.DOCUMENT field with the correct value

    Posted 09-30-2024 11:04
      |   view attached

    Hi Andrew,

    I attached a screenshot of what we have in the template.



    ------------------------------
    Adam Ames
    Kwik Trip, Inc.
    ------------------------------



  • 9.  RE: Unable to populate DOCLINKS.DOCUMENT field with the correct value

    Posted 10-07-2024 09:37

    Hi Andrew,

    I have been playing around with it and not able to replicate your issue. I will keep looking into it.



    ------------------------------
    Adam Ames
    Kwik Trip, Inc.
    ------------------------------



  • 10.  RE: Unable to populate DOCLINKS.DOCUMENT field with the correct value

    Posted 10-08-2024 09:37

    Hi Andrew,

    I think your doclinks.description and doclinks.urlname was need to be the same.

    From my example: doclinks.description = Montana Open Road

                                   doclinks.urlname = Montana Open Road.jpg



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



  • 11.  RE: Unable to populate DOCLINKS.DOCUMENT field with the correct value

    Posted 10-08-2024 14:27
    Thank you all, still not working. I have a work around but where I update the Asset and populate the docliink table then I go update the doclink table via MxLoader

    Can I ask if you have ever created your own MxLoader or have access to the code behind the current verison?

    Thank you,
    Andrew





  • 12.  RE: Unable to populate DOCLINKS.DOCUMENT field with the correct value

    Posted 10-08-2024 15:06

    Hi Andrew!

    Can you share an image of the object structure like this below? Do you use the classes defined as seen there (psdi.iface.app.asset.MoutAssetProcess). Or did you create your structure from scratch using docinfo as well? Can you show me please?

    Regards!



    ------------------------------
    Martin Fabra
    ARSAT S.A. - Actively seeking employment
    ------------------------------



  • 13.  RE: Unable to populate DOCLINKS.DOCUMENT field with the correct value

    Posted 11-19-2024 04:41

    Thank you all for your replies, my structure is exactly the same and MxLoader matches all of your screen shots. Apologies but I was away with limited access to emails .We did a reboot a couple of weeks ago and it just started working, go figure.

    One question I do have is I have very specific business use cases and I wanted to bake them in to MxLoader have you ever considered creating your own MxLoader or would you have a copy which has access to the code behind it?



    ------------------------------
    andrew brown
    Intel
    ------------------------------