Import Utility Script Help

I have tried adding a script in the “During Import” section of the Free Import Utility, but it does not seem to work. I am wondering if the field names are not being recognized correctly. I am importing data into the address book.contact form. So, I am referencing all the contact form fields as shown below, but it processes the import successfully without applying the changes in the script. Any help would greately be appreciated.

Here is my code:

Option Declare

Use “Common”

Sub Inititalize

'Error Handler

On Error Goto Error_handler

ImportDoc.Type = “Person”

ImportDoc.FirstName=mid$(importdoc.firstname,2)

ImportDoc.LastName=“HHHHHEEEELLLOOOO”

ImportDoc.emailpub1=mid$(Importdoc.emailpub1,2)

ImportDoc.MiddleInitial=“*****”

'Updates made here must be saved

call importDoc.save(True, true)

Exit sub

Error_Handler:

  Call output_error("During import formatting error-trim script",Erl,True,True)

  Exit Sub

End sub

Subject: Import Utility Script Help

Free Import Utility??

Any link?

JYR

Subject: Link to free Notes/Domino Import Utility

Subject: Import Utility Script Help

Rosette,

Some questions/comments:

Option Declare

Use “Common” ’ not sure what this does or why it’s needed?

Sub Inititalize

'Error Handler

On Error Goto Error_handler

%REM

How do you get importDoc? Where’s it from. Are you sure it has the data you want? Specifically, is it a person doc from your NAB. Does it have the fields you reference below if you look at it in the debugger?

%END REM

ImportDoc.Form = “Person”

ImportDoc.FirstName=mid$(importdoc.firstname(0),2) ’ Need to use (0) at the end of a field name

ImportDoc.LastName=“HHHHHEEEELLLOOOO”

ImportDoc.emailpub1=mid$(Importdoc.emailpub1(0),2) ’ Need to use (0) at the end of a field name

ImportDoc.MiddleInitial=“*****”

'Updates made here must be saved

call importDoc.save(True, true)

Exit sub

Error_Handler:

Call output_error(“During import formatting error-trim script”,Erl,True,True)

Exit Sub ’ redundant, sub ends here anyways

End sub

HTH

Shawn

Subject: Help from AGECOM Support

Hi Rosette,

If this is the free import utility you have downloaded from our website (Import Utility for Notes) then I will try and help you.

The import script looks correct. So some things to check:

  • Have you selected the script in the ‘During Import’ section of the Import Profile form?

  • Have you selected the checkbox ‘Run Custom Scripts after each record is imported’ in the same section of the import profile form?

Please note that you don’t need to set the ‘Type’ field as the import automatically recognizes if the target form is ‘Person’ and sets the Type field accordingly.

Make sure you have the latest update of the import utility by selecting ‘Check for Update’ from Actions menu.

If you need further assistance please return to our site and fill in a ‘Contact Us’ form. One of our support people will get in contact with you:

http://www.agecom.com.au/agecom.nsf/ContactUs?OpenForm

Regards,

Alex

Subject: RE: Help from AGECOM Support

Thanks, Alex.

I submitted a request to the support team.

I have check marked and selected the settings as noted, but it still does not seem to work. … look forward to hearing from the team.

Ros

Subject: RE: Help from AGECOM Support

Hi Alex,

I have not heard back from the support team yet. So, I would appreciate any help you could provide on the problem I am having with my script in the Import utility.

Thanks,

Ros

Subject: RE: Help from AGECOM Support

Rosette,

We received your request for assistance via our website and emailed you, to the address supplied, on the 3rd Feburary with the resolution.

Please check your email again and let me know if you are unable to find it.

Alex

Subject: RE: Help from AGECOM Support

Hi Alex,

Thanks for your follow up. Could you please resend the solution to me. I must have accidentally deleted it. Or, possibly post it on this topic.

Thanks,

Rouset

Subject: RE: Help from AGECOM Support

Rosette…have sent the email to you twice (please check your Junk mail folder) but am posting a copy of the email with the solution here for you…

Alex


Hi Rosette,

I’m pleased to advise we have found the cause of your problem. There is a spelling error in ‘Sub Initialize’ in your custom script…you have actually spelt it as: ‘Sub Inititalize’ - note the extra ‘t’ in it. If you correct the spelling the script should now work.

In addition to this we have now made an enhancement to the application to check for matching ‘Sub Initialize’ and ‘End Sub’ to catch these sorts of issues and to ensure better validity of custom scripts. Other enhancements and bug fixed have been made so I would recommend you downloading the latest release from our website at:

After downloading & applying the latest design to your production database please feel free to contact me again if you experience any further problems.

Regards,

Alex Elliott

AGE Computer Consultancy

Subject: RE: Help from AGECOM Support

Many thanks, Alex… The value of a second pair of eyes is unmatchable! :slight_smile: …Rosette

Subject: RE: Help from AGECOM Support

One more questions for you… My data needs some clean up. I need to remove the tab character infront of some data getting imported. What function would help me with that? I tried to use mid$ or strright, but that is giving me an error. Your help will be appreciated.

Importdoc.firstname=strright(importdoc.firstname,chr(9))

Gives me type mismatch error.

Thanks,

Rosette