unique Name field in desktop version
There should be a check box or even better, a built in function for the desktop version that ensures the Name field is unique.
This exists on the Android version and should be set up in the desktop version.
-
Tim commented
this is done with the below script as a trigger before saving
code for unique entry
var myField = entry().field("myField"); // Value of myField
var entries = lib().entries(); // Array containing all the entries in the library
var unique = true; // Presuming, initially
for (var ent = 0; ent < entries.length; ent++) { // Loop through all entries
if (entries[ent].field("myField") === myField) // If there is ever a match,
unique = false; // Remember it
}if (!unique) { // If not unique,
message("myField is not unique. Try again."); // Tell the user
cancel(); // Disallow the save
}