Grooper 2.90.0063 is available as of 3-24-2021! Check the  Downloads Discussion  for the release notes and to get the latest version.
Grooper 22.00.0007 is available as of 6-28-2022! Check the  Beta Discussion  for the release notes and to get the latest version.
Grooper 21.00.0049 is available as of 7-1-2022! Check the  Downloads Discussion  for the release notes and to get the latest version.

Mapping filename using "Mapped Export"

tgarnetttgarnett Posts: 75 ✭✭✭
I'm using mapped export for the first time rather than the old "File System Export" because I need to map a parent content type as well.  I've created my CMIS Repository and have configured the mappings under the "File (cmis:document)" object.  

My main Content Type contains the value to be used for the file name, while my parent content type contains the value for folder name.  I've mapped the folder name field and it works as expected, but I can't see how to map the filename.  "Export Field Mappings" only lets me map the CMIS properties of Name, Archive, Hidden, Read Only, and System.  I tried mapping my filename field to Name just to see what would happen, and the documents were given the name of the folder object in Grooper (e.g. "Document (1)").

How do I map the name of the files being exported?  I'm currently running Grooper 2.72.0014.

Best Answers

  • tgarnetttgarnett Posts: 75 ✭✭✭
    edited May 2019 Answer ✓
    Just figured this out with Josh.  The first issue is that my "Filename" field was set to read-only in Grooper.  Apparently this prevented it from being used as the filename, so it defaulted to the content type name.

    This presented a second issue - with the filename field being mapped to the "Name" CMIS property, the file would export as a generic File object named "PB-1977-8" with no .pdf extension.  I should be able to get around this easily by adding the extension to my calculated field.

    Not sure if either of these issues are bugs or not, but it definitely doesn't seem like I'm handling this activity as it's intended to be used.
  • tgarnetttgarnett Posts: 75 ✭✭✭
    Answer ✓
    Issue less solved than initially expected.  During testing we changed the Name mapping to another field, Case Number.  These exported successfully, though without the .pdf extension.  Given that this worked, I made three changes that should have fixed my issue:  I remapped Filename to the Name field, changed Filename to no longer be read-only, and added ' + ".pdf"' to my calculate expression.

    No matter what changes I make, the documents always export named as the "Case Number" with no extension.  If I unmap Name or change it to a different field, all documents are still exported using Case Number.  I tried resetting the connection to the CMIS Repository with no changes.  It's like it locked down the first settings that worked and will not change.  Granted, the CMIS Property "Name" doesn't seem like the right place to designate a filename, but I can't see anywhere else to do it.

    I may be able to kill this CMIS connection and rebuild it to get it to stop using Case Number, but nothing about this feels like it's being used as intended, so I'd prefer to get some feedback before moving forward.  Mapped Export also doesn't appear to have handling for duplicate file names, so I may be off in thinking that it's intended as a successor to the legacy File System Export (which I'm not using so I can map from parent content types).

Answers

  • rmccutcheonrmccutcheon Posts: 756 ✭✭✭
    edited April 2019
    For the field you can set a default value expression (here is a link to some expressions) then when mapping you can map it to the field. If you don't want the field to show up when in data review you can hide the field. That is my suggestion but there might be other ways to do this. @GrooperGuru do you know any other ways? 
  • tgarnetttgarnett Posts: 75 ✭✭✭
    The main content model has three fields, plus one named "Filename" which just combines the 3 using a calculate expression.  It's this field that I'm trying to use as the name of my PDF files.
  • tgarnetttgarnett Posts: 75 ✭✭✭
    edited June 2019
     
Sign In or Register to comment.