Duplicate index

Steven Burrows

It’s a bit hard to read, but a couple of comments:

  • That Varset looks like it updates the Key Field which is risky, it can circumvent the Link Write functionality. Either the parameter “Ean” holds exactly the same value as the XMLGet so there is no point in updating it, or they are different and you have just broken the Link Write.
  • A long shot, but Alpha 13 is not the same as Alpha #13. XPA might be doing some Picture conversion during the link write which the Varset is not.


In either case a condition of LoopCounter() > 1 on the Varset should fix it, but any difference in the Ean value between XML/Param/Table might still need some consideration.



Steven Burrows


From: main@magicu-l.groups.io <main@magicu-l.groups.io> On Behalf Of Pavel Mencl via groups.io
Sent: 10 January 2023 07:54
To: main@magicu-l.groups.io
Subject: [magicu-l] Duplicate index




I have a table with only one index (unique) and then a batch program that reads data from an Xml file and creates/updates records  via LinkWrite (first picture below).
It works fine for new records but when it's run for an existing unique key value, it returns Duplicate Index Error.
The update in RecordSuffix is a bit unsual (second picture) but I always thought that LinkWrite always prevents duplicate index error.
What am I missing here?


Pavel Mencl

Spot on, Steven. Solved by Varsetting the Virtual upon which the LinkWrite acted.