Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Minor Enhancement: New API ListGridField setExportFieldName()

    Hi Isomorphic,

    would it be possible to get an API ListGridField setExportFieldName() in 6.1p, that sets the name of the column in the resulting CSV / XLS / OOXML file?
    Reason behind this is that a client asked for stable export names regardless of used browser language (the fields in my .ds.xml are i18n'd with fmt-tags).

    Thank you & Best regards
    Blama

    #2
    As addition: I'm talking about exportClientData(), not exportData(), if that is important.

    Comment


      #3
      We're not following - you already have the ability to provide a field.title and update it on the fly, why is something more needed?

      Comment


        #4
        Hi Isomorphic,

        I'm already using the title in fmt-tags in my .ds.xml to set it to something nice like "Company Name" in English or "Firmenname" in German.
        Now these titles are used for exports, which is fine in the most cases. But here the problem is, that the customer needs a specific format like "COMPNAME" for exports as they can't column-map in their legacy-tool.
        Of course I could alter the column-names to the technical name, run the export and then re-set the names to nice ones, but this would mean code and more importantly an intermediate display of the technical names as column names in the GUI.
        My suggestion is an API like setFieldNameInExport(String fieldNameInExport). The name set there is used for exports. If it is not used, getFieldNameInExport() defaults to getTitle().

        Best regards
        Blama

        Comment


          #5
          Sorry, setting title via setFieldTitle() is how we'd recommend handling this case in your application. You can, of course, trivially write yourself a method that temporarily sets the title to a custom listGridField attribute of your choosing, does the export, then sets it back.

          Comment

          Working...
          X