meeta
meeta
Offline
0
Auxillary tables in SBM do not allow unique records based on a field or combination of fields. Need the solution to avoid duplicate records.
Responses (4)
  • Accepted Answer

    Thursday, November 09 2017, 03:24 PM - #Permalink
    0
    I have seen past posts about adding a primary key to the database on the field that needs to be unique so if you do a search you might be able to find the specific details.

    I do have a solution that we have implemented that doesn't stop users from creating duplicate records in an Aux table, but does identify them as a duplicate, before the user hits "OK" - and they they have the choice as to whether they proceed. Our solution was to add an embedded report to the edit form that is configured to be query at runtime based on the field that you want to be unique. When the user enters a value in the field and then moves to the next field, the report will run and return any matching value. (In our case we have a "Versions" Aux table where the 'title' field holds unique version numbers. So when a user enters a value in the 'title' field the report will run and any existing records).

    As I mentioned, this doesn't stop users from still creating duplicates, but at least notifies them that they are about to create a duplicate - which is normally enough to stop them creating a new one.
    Like
    The reply is currently minimized Show
  • Accepted Answer

    meeta
    meeta
    Offline
    Wednesday, November 15 2017, 12:05 PM - #Permalink
    0
    David,

    Can you share the solution to identify duplicate ?

    Thanks
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, November 15 2017, 02:29 PM - #Permalink
    0
    Meeta,

    Hold tight for a bit on this topic, I'm working on a kb doc that should help and will post a link here when I'm done but it has one caveat that you have to be running SBM 11.1 in order to use it as it takes advantage of the JSON API introduced in that release.
    Like
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, November 15 2017, 05:19 PM - #Permalink
    0
    Meeta,

    See if this link helps you assuming you're running at least SBM 11.1. Post comments if you get stuck as you're the first to try it.
    The reply is currently minimized Show
Your Reply

Recent Tweets

Twitter response: "Invalid or expired token."