3

Unique contraints and autoincrementing fields

We've had requests from clients to support these features, and I'd love to get feedback about the way you'd all envision them working.  I put these two features together in this post as the main challenge for both of them is determining the scope: If you set shot code to be unique, is that globally unique across all projects, just within a project, just within a sequence, or within some other container (episode, scene)?  How would you want to use it? 

Maybe you can check a Unique box in the field config, and then also be able to choose a another field on the same entity that sets the context (none for global, Project for within the project, etc).  That could also work to set asset names to be unique within their asset type or version names to be unique within their shot.  Can you think of any cases that wouldn't cover?

Auto-incrementing has the same scope issue, and then additionally might need options like the starting number and the increment to increase each time (if it's not always by one).  Would that cover the range of uses you can think of?

Thanks for your input!

7件のコメント

  • 0
    Avatar
    Andy Geers

    Hi Isaac,

    It's not something that we've particular encountered as a major need. That said, if we were to enforce unique shot names, it would definitely be per-project rather than global. I can think of one case where we might have wanted to be able to enforce unique on certain columns of tasks of a particular type linked to a particular shot (e.g. there should only be one ANIM task linked to the ZZ001_002 shot with the value X in column Y) but nothing that's really caused us major headaches by not enforcing.


    That said, FileMaker had this handy feature where you could pull up any arbitrary set of results (e.g. filter for a particular set of shots) and then it could pull out duplicate records into a separate result set.

     

  • 0
    Avatar
    Pliny (John Eremic)

    I'm one of the folks who requested this feature -- has to do with how I track jobs, RED media batches, and other custom entities.  A per-project unique would be good; a per-entity would be even better.

  • 0
    Avatar
    Pliny (John Eremic)

    Thinking of moving my media library "vault" system over to SG (every original software installer, HDD, or tape that has ever walked through these doors).  Two things standing in the way: (1) need auto-incrementing field to assign a unique # to each new entry; (2) need custom entities to be project-agnostic.

    Well: I could make it work, kinda, (2) but there's actually a (3).  More custom entities please!  I'm almost tapped out (see request 1109).

  • 0
    Avatar
    Don Parker

    John, any way you can get by with the "ID" field *for now* as your auto-incrementing field?

    I'm making a note about adding a pref to entities to make them project specific y agnostic.  Though I suppose that could be a setting on the "Project" field per entity (allow null or not).

    I remember thinking there is no way we'll need more then 10 custom entities!  Ah, the ignorance of youth.  If you run out before we add more or build the entity creation tool, ping me and we'll hook you up.

  • 0
    Avatar
    Pliny (John Eremic)

    If the ID field is an auto-incrementing number, _and_ if you guys can help out dumping 3000 existing records into the table (while preserving my current "ID" values) - yes, I think I can.

    Re: allowing project to be "null" -- that ought to do it.

    I seem to recall somebody once thought no one would ever need more than 640 KB of RAM ... Yes I need at least 10 more custom entities.  20 would be nice, if it's all the same.  I'm already out. (2 or 3 remain, but I've already specced out another 6-8, and they all depend on each other.)

  • 0
    Avatar
    Pliny (John Eremic)

    Don, I should amend that with one more thing: I'd really want the "Quick Jump" tool to search across custom entities before I migrated my media library into SG.

    The query builder would work of course but Quick Jump would be much more user-friendly for my staff in this case.

    https://shotgunsoftware.zendesk.com/forums/31278/entries/42199

  • 0
    Avatar
    Don Parker

    You can do that with a pref!  Just responded to that post...

サインインしてコメントを残してください。