Menu

Choosing Fields for CSV Export

2013-12-24
2014-01-03
  • jitsobullet

    jitsobullet - 2013-12-24

    Hi,

    In iTOP 2.0.2, does the function exist to allow users to select which fields to export in CSV format rather than exporting all the fields.
    It does become a nuisance when running OQL queries and the same data appears multiple times in the export.

    Kind Regards

     
  • Denis

    Denis - 2014-01-02

    The interactive CSV export (that you can reach by clicking on the "toolkit" menu next to a list) does not allow to choose the fields to export.

    However, for OQL queries, you can use the "Query phrasebook" feature: an administrator can design an OQL query, define which fields to export and send a preconfigured URL to the end-users. (Check out the wiki: https://wiki.openitop.org/doku.php?id=2_0_2:admin:phrasebook)

     
    • jitsobullet

      jitsobullet - 2014-01-02

      Hi Denis,

      Thank you, yes i have just discovered this feature and have been using it....proving to be very helpful!
      However, I have stumbled upon a minor issue, and that is the extraction of Contact Names using this method. It will not pull the full name, but rather the surname only.

      Can the the full name be pulled from using the 'Fields' selection?

      Thanks

       
  • Denis

    Denis - 2014-01-02

    On top of all the "normal" fields, an extra field is built internally for all classes: it is named "friendlyname" and contains the name of the object as displayed on hyperlinks.
    I'm not sure if it will work, but you can try adding "friendlyname" to your list of fields.

    Note: the same is true also for "external keys": if you have a field named "org_id" then a field "org_id_friendlyname" is automatically added by the framework.

     

    Last edit: Denis 2014-01-02
  • jitsobullet

    jitsobullet - 2014-01-02

    Having tried entering 'friendlyname' as a field, it seems to produce no data at all in the export, normally i would see an error if the field was not recognized.

    Having said that, it does work when using the 'external keys' method.

    My next approach was to try and use the 'lnkContactToContract' class and although this was accepted as lnkContactToContract.contact_id_friendlyname - the data for this field does not appear under the export.
    I assume lnk classes get ignored at this stage, is this the case?

     
  • jitsobullet

    jitsobullet - 2014-01-03

    Yep, the demo seems to be working perfectly.

    Just did some digging and realised that i didnt update cmdbabstract.class.inc.php, whilst upgrading to 2.0.2

    Now it works, and correctly picks up the friendlynames per class

    Thanks once again Denis!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.