At the moment it is not possible to add two books with the same title. This is not ideal if one has more copies of the same book or simply different editions with the same title.
The error is shown in the screenshot.
You can temporarily disable the check by going to the Settings screen and under General Settings uncheck the "Check for value uniqueness upon saving".
A better approach would be to have more than one "Required" field, in you case perhaps add the Year and/or Edition fields.
You can do that by going to the General Field Settings (under the Setting menu of the module) and in that table, check the checkboxes of the Required column for the aforementioned rows (Year and/or Edition). In this case, as long as at least one of those values is different, it will be considered as a unique item.
Last edit: SandBird 2023-07-17
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks! That's a great solution if one has different editions of the same book, but the problem persists if one has two copies of exactly the same book, as all fields would be the same.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Simply put; if you don't want the system to check for uniqueness, switch it off in the settings. There's the option to switch it off completely. I really don't think that allowing to bypass it for one item as any update to the item will cause the same issue to be triggered. There's no harm in switching it off completely, you can still mark fields as required to avoid empty values and you can have items with the exact same values multiple times.
However, if I were you, I would simply add a new field called "number of copies" (for example) using the Alter module wizard and set that to the number of copies held.
Hope this helps.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I will also add another approach that I use, in case you want to visually see the duplicates - Enable the "User Numeric Field 1" in the General Field Settings (in my case I also edited the custom label to be called ID or Archive ID maybe in your case Book ID) and check the Required checkbox.
Then, go to the Tools menu and under Auto Numbering enable that field (check the box).
This way every time you create a new entry, it will generate the next number which will make the whole entry unique.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You can temporarily disable the check by going to the Settings screen and under General Settings uncheck the "Check for value uniqueness upon saving".
A better approach would be to have more than one "Required" field, in you case perhaps add the Year and/or Edition fields.
You can do that by going to the General Field Settings (under the Setting menu of the module) and in that table, check the checkboxes of the Required column for the aforementioned rows (Year and/or Edition). In this case, as long as at least one of those values is different, it will be considered as a unique item.
Last edit: SandBird 2023-07-17
Thanks! That's a great solution if one has different editions of the same book, but the problem persists if one has two copies of exactly the same book, as all fields would be the same.
I'll be shameless and push to perhaps resurrect my ticket request #43 Suggestion: Allow Bypass Unique
Simply put; if you don't want the system to check for uniqueness, switch it off in the settings. There's the option to switch it off completely. I really don't think that allowing to bypass it for one item as any update to the item will cause the same issue to be triggered. There's no harm in switching it off completely, you can still mark fields as required to avoid empty values and you can have items with the exact same values multiple times.
However, if I were you, I would simply add a new field called "number of copies" (for example) using the Alter module wizard and set that to the number of copies held.
Hope this helps.
I will also add another approach that I use, in case you want to visually see the duplicates - Enable the "User Numeric Field 1" in the General Field Settings (in my case I also edited the custom label to be called ID or Archive ID maybe in your case Book ID) and check the Required checkbox.
Then, go to the Tools menu and under Auto Numbering enable that field (check the box).
This way every time you create a new entry, it will generate the next number which will make the whole entry unique.