Working with Excel Files Tutorial Seems to be Incorrect

Hello, I have a simple application that is functionally very close to the excellent My Contacts tutorials.
Unfortunately when I started to extend my application by importing data from Excel files things started to seem strange.
It wasn't until I tried to add data to my application from a second Excel source that I started debugging and found that the method used in the tutorial appears to be wrong.

When the tutorial gets to the IF statement (labled Discard?) the condition suggested in the text is to use "GetContactByEmail.Count > 0 and Overwrite = False" but the diagram shows "GetContactByEmail.CurrentRowNumber > 0 and Overwrite = False"

Well I believe that both may be incorrect.  When I was debugging my import routine, because nothing was getting Updated, I noticed that Count always seemed to be -1 and CurrentRowNumber could in fact be zero because it seems that the very first row of the databse is Row 0.  So if you used Count you'd never get anything updated and if you used CurrnetRowNumber you'd never be able to update the first record in your database.

My solution was to use  EntityRefIntegerToInteger(GetRecordByCMID.List.Current.Atty_Files.Id) > 0 and Overwrite = False  which seems to be working nicely.

So if someone looks at the tutorial and comes to the same conclusion new users would probably appreciate it being updated.  I have also been marking up other PDFs that have some incosistances/errors that I would be glad to share.

Hi David,

From the top of my head I believe you could also use the list Lenght (that is the number of items a list has) instead of Count (that is actually the count from the database when a query is made).
We'll be happy to take a deeper look into it and correct the training materials, just forward this and your other notes to

Tiago Simões

Excellent, I'll put some stuff together.

As for using Length, everytime I watched that it stayed at  -1  as well so I didn't bother trying it.