Settings and activity
4 results found
-
6 votesTim shared this idea ·
-
9 votes
An error occurred while saving the comment -
8 votesTim supported this idea ·
-
1 vote
An error occurred while saving the comment Tim commentedthis 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
}Tim shared this idea ·
the linked fields need to exist in the linked library before import