Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
  • 1.  CSV File Data Import Order

    Posted Wed July 26, 2023 08:46 AM
    Edited by Matt F Fri July 28, 2023 12:47 PM

    Hi Folks,

    Working in MX 7.6.1.2. Is there something that controls the import order of data in a CSV file through Enterprise Services? I assumed it would start with the first row after the header.

    In performing a test load for Classification Attributes, they are not displaying in the expected order on my Classification once loaded. It appears to have read the last row of the CSV first. (ie. ATTRIBUTE4 is showing first in the list, when we want it to be last). 

    When I tried reversing the sort order for the whole list, it also didn't appear to go in in expected order. 

    DLSYS,DLCLASSIFICATIONInterface,AddChange,EN
    CLASSIFICATIONID,CLASSSTRUCTUREID,DESCRIPTION,GENASSETDESC,HIERARCHYPATH,OBJECTNAME,ASSETATTRID,USECLASSINDESC,MANDATORY,CSUW_OBJECTNAME,OBJECTVALUE,SEQUENCE,USEINDESC,USEINSPEC,APPLYDOWNHIER,DATATYPE,DOMAINID,CUW_OBJECTNAME,CUW_DESCRIPTION,CUW_OBJECTVALUE
    CLASS1,1001,CLASS1,1,CLASS1,CLASSSTRUCTURE,ATTRIBUTE1,1,0,ASSET,ASSET,10,1,1,0,ALN,CLASS1_DOMAIN,ASSET,"Use with Assets",ASSET
    CLASS1,1001,CLASS1,1,CLASS1,CLASSSTRUCTURE,ATTRIBUTE2,1,0,ASSET,ASSET,20,1,1,0,ALN,,,,
    CLASS1,1001,CLASS1,1,CLASS1,CLASSSTRUCTURE,ATTRIBUTE3,1,0,ASSET,ASSET,30,1,1,0,ALN,,,,
    CLASS1,1001,CLASS1,1,CLASS1,CLASSSTRUCTURE,ATTRIBUTE4,1,0,ASSET,ASSET,40,1,1,0,ALN,,,,

    Thanks in advance!

    Cheers,



    ------------------------------
    Matt F
    ------------------------------



  • 2.  RE: CSV File Data Import Order

    Posted Sun July 30, 2023 08:56 PM

    Asset specs are going to be sorted based on what is defined in the orderby of specifications_datasrc in the out of the box asset application. The easiest way to see this is to export the asset application and search for specifications_datasrc to see how it's being ordered by. That will likely explain to you why ATTRIBUTE4 is showing first. The logical order to me is displaysequence,assetattrid because you can set a displaysequence on the specification which we should enforce first. Then if someone hasn't provided it, it should sort alphabetically based on the specification name to me. 



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



  • 3.  RE: CSV File Data Import Order

    Posted Tue August 01, 2023 10:35 AM

    Hey Steven,

    Thanks for the reply, appreciate the note on the datasrc orderby. Currently the XML is set to order by displaysequence,assetattrid as you noted, which in my CSV I do have the sequence specified (10, 20, 30, 40) for each Attribute. To confirm, they are displaying in the proper order (sequence) on the Asset > Specifications tab, it's just out of order on the Classification > Attributes view. So it appears the classspecusewith.sequence is copying to assetspec.displaysequence no problem?

    When I compare the entries in the UI to the DB table, it appears they are sorting by rowstamp in the Classification > Attributes view.  Could this have anything to do with how the object structure has been setup? 



    ------------------------------
    Matt F
    ------------------------------