You probably get 3 copies because you do 3 imports.
The error can be caused by deleting / importing while in find or preview mode.
Shouldn't I get the Category records when I am in the Category layout?
Shouldn't I get the People records when I am in the People layout?
I don't see where/how I am CAUSING the duplication. Do you?
Start your script by entering browse mode.
Check your relationships don't have "allow creation of records via this relationship".
If they do, alter the remaining imports in your script to update existing records in found set and check add remaining data as new records.
If they don't, then leave your import as you had it.
(You might need to enter browse mode as you enter each layout.)
Without seeing how the imports are structured and how your relations are defined, it's hard to say.
All I see is that you import the same file into 3 different tables. I don't see what file it is.
Also, the relationship category - popupData based upon "category" is fishy.
Thanks for the reply.
Yes, I was 'boneheadedly' (is there such a word?) trying to jam the same file ($$Path) into 3 different tables.
I have a Skills application. I want to import member names, addresses etc from my Membership app into Skills.
Skills has a Category portal on it's main 'People' layout. (Category is 'Computers' with a skill field of 'Web Sites' etc...
And, yes, turning off 'Add new records from this relationship' does the job. But, doing so means that the Categories portal won't work. I don't think this should be as difficult as I am making it....
Your source table may have 3 categories for every person.
People::ID should have "Always" "Unique" validation. (same as ID = primary key field in every table)
You should add
"Enter Browse Mode" and
"Show All Records"
before "Delete All Records".
Your error that you are in the wrong mode means that you probably aren't in browse mode, and hence "wrong mode".
And of course one must know that the real name of Delete All Records is Delete All FOUND Records. Like you said, a Show all is necessary.
Agreed. It should be there.
But this can't be the reason "why 3, not 4 nor 2". If undeleted records remain, they should become 4 or 6 or more every time performing the script.
And I wonder OP says "turning off 'Add new records from this relationship' does the job", this feature never add records to related table when importing records.
open debugger - activate "pause on error - close debugger - run the script - does it stop with an error ? where, what error ?
But this is a stand alone application, not on a network, and I am the only user.......