Menu

#58 Title duplication not allowed

4.9.1
wont-fix
nobody
None
2023-07-18
2023-07-17
Mario
No

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.

Thanks in advance for your time!

1 Attachments

Discussion

  • SandBird

    SandBird - 2023-07-17

    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
  • Mario

    Mario - 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.

     
  • SandBird

    SandBird - 2023-07-17

    I'll be shameless and push to perhaps resurrect my ticket request #43 Suggestion: Allow Bypass Unique

     
  • Robert Jan van der Waals

    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.

     
  • SandBird

    SandBird - 2023-07-17

    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.

     
  • Robert Jan van der Waals

    • status: open --> wont-fix
     

Log in to post a comment.

MongoDB Logo MongoDB