DataPort Import Documents Failing with Author / Signatory cannot be left blank

Hi , 

I am trying to import some sample document into CM10 and the import is failing with the 'Author/Signatory' cannot be left black 

This is my import file path looks like Title and File name 

Title                          DOS File
CM10.1_COMSDK C:\Users\Downloads\CMDocuments\CM10.1_COMSDK.pdf
CM10.1_Install C:\Users\Downloads\CMDocuments\CM10.1_Install.pdf

Getting the below error: 

Error Id: 1 Uri: 0 Details: Input string was not in a correct format. (RecordContainer) AP5CD4185CH4 10:00:00 35660
2024-09-19 17:36:55:219 4 00:00:00:0000000 Error Id: 1 Uri: 0 Details: Verification of an import item failed with an error. Detail: 'Author / Signatory' cannot be left blank. AP5CD4185CH4 10:00:00 35660

When I add another mapping as 'Author' in my mapping file and mapped 'Author' to 'Autho/Recipient' then I got cannot assign the value for 'Author/Recipient' for Record Type 'Document' 

  • Verified Answer

    +1  

    Hi Arjun,

    This looks to be due to an extra field that has been made mandatory on the Document entry form (set by the CM administrator).

    By guess, it would be the field called 'Author / Signatory' that would need to be mapped, however, if the caption editor was used to change the caption of the field, it may be called something else in dataport (check with your CM admin if the name of the 'backing field' is also called 'Author / Signatory' or its using a different field and just the caption was changed)

    I tend to find the easiest way to determine what format should be imported, do to an Export of an equivalent record first and the field in question.

    The import should then match this same format.

    -Scotty

  • 0 in reply to   

    I tend to find the easiest way to determine what format should be imported, do to an Export of an equivalent record first and the field in question.

    The import should then match this same format.

    I wish that was always true.

    Tried to export a hierarchical lookup set a few months ago, but the importing it's own output proved to be impossible.

    Could get a bit further in the import process by manually modifying the project file, but in the end it was not working at all.

    Didn't bother to create a case for this with support as it would probably take many months to come up with a solution (if they'd get this far at all). It was far easier and quicker to create a workaround with the SDK instead.

  • Verified Answer

    +1   in reply to 

    Good to know about the hierarchical Thumbsup

    Being honest I haven't used DataPort extensively in several years as I've gotten too used to whipping up a quick COM SDK script in an Excel spreadsheet to connect and do what I need to do (for both Exporting and Importing).

    -Scotty

  • 0 in reply to   

    Thanks Scotty , I will check my admin for this mandatory field.

    Can you please share or point any references of sample export and import scripts using COM SDK. Thanks 

    -- AJ

  • Verified Answer

    +1   in reply to 

    Hi AJ,

    Best starting place for the COM SDK is a PDF that comes with the install media CMxxx_COMSDK.pdf

    You will need to make sure you have also installed the COMComponents to match the bit version of CM which should match the bit version of your local office install.

    From there if you jump into a VBEditor from Excel you can then jump into Tools -> References

    Scroll down to find the 'Content Manager SDK Type Library' or the 'TRIM SDK Type Library' (make sure the location shown at the bottom when selecting matches your install location).

    You can the  'connect' to CM using VB Code using the COM SDK to extract data into the spreadsheet or loop through rows in your spreadsheet to update values (for this you will need Excel VBA knowledge as well - https://goalkicker.com/ExcelVBABook/ is a Free PDF that has great tips and examples to do with Excel VBA)

    Sample script below which should run in a blank spreadsheet to output the record number and title of records in your 'Favourites'

    Screenshot of sample favourites:

    Option Explicit
    
    Public Sub PopulateSheet()
    
        Dim trimDb As New TRIMSDK.Database
        
        trimDb.ID = "45"
        trimDb.Connect
        
        If Not trimDb.IsConnected Then Exit Sub
        
        ''''''
        
        Dim trimRecS As TRIMSDK.Records
        Dim trimRec As TRIMSDK.Record
        
        Sheet1.Cells(1, "A") = "RecordNumber"   'Output the header rows
        Sheet1.Cells(1, "B") = "RecordTitle"
        
        Set trimRecS = trimDb.MakeRecords       'Creates a 'blank' record search
        trimRecS.SearchString = "favorite"    'Sets the search string
        trimRecS.Start                          'Sets the search 'cursor' to 0
        
        Dim rowOut As Long
        rowOut = 2
        
        Set trimRec = trimRecS.Next             'Grab the first item in the search
        Do Until trimRec Is Nothing
        
            Sheet1.Cells(rowOut, "A") = CStr(trimRec.Number)
            Sheet1.Cells(rowOut, "B") = CStr(trimRec.Title)
            
            Set trimRec = trimRecS.Next         'Grav the next item in the search and then loop
            rowOut = rowOut + 1                 'Next entry will be written to the next Excel row
            DoEvents
        Loop
        
        trimDb.Disconnect                       'Disconnect from the Db
    
    End Sub
    

    Sample output straight into my spreadsheet

    If you have a spreadsheet with values you can do the reverse, and search for a record based on a cell value, and then update the Title, or a different property, or create a new record from scratch. The COMSDK.pdf in the install media is pretty fleshed out and a great reference point.

    -Scotty