Text combo field as a unique

Text combo field does not accept unique nature. This will give different combo to filter in the related records

Hi 8933998927, this sounds very interesting. Did it work for you? If yes, can you please share the code you usedd?

I see this is from 2016 but it would still be useful for us as well.

A little late to this conversation, but in case others are looking for a solution to this (as I am now), I'm thinking of doing the following:

  • Create the text formula field on your object to combine multiple fields. In my case it will be a product code and language.
  • Use custom JS on the input form, when the user blurs out of the second field. Combine the two values and request records via the API, filtered by "text formula" field is equal to that combined value.
  • If the returned data has a result (1), then disable the submit button and alert the user to go back and edit one of the input fields (in my case, product code or language). Alternatively, provide a link to edit the existing record.

Yep, this feature we be really good.

I have a need for similar functionality. We track three fields, keyword, city & state. The combo of the three fields needs to be unique and I haven't been able to figure out how to make that happen in Knack.

I agree this would be very helpful.

Tried similar but it is not working.  Just guessing, but appears that the populating condition must fire after the record is written, meaning the field is still null when written to db thus falling through the uniqueness check.  I can write duplicate records all day with this set up, unfortunately.

Really would like a solution to this unique combo fields, admin. :)

 

I ended up solving this with an extra field.   

Fields:   

Part Number   Short Text

Customer        Short Text

Combo            Text Formula   {Part Number}:{Customer}

Unique            Short Text         Conditional Rule set to just make Unique = Combo.    Then set this to Must be Unique.

 

 

A few extra fields, sure...but seems to be working.

Yes, this would solve the Unique on only 1 field issue.

This would be a helpful feature.  An example is I would like thePart Number and Customer combo to be unique.  I can have the same part number but never the same part and customer.     Not sure how to handle this, as it is a big problem if there are 2 in the system.

 

How does this work? I followed your logic and created similar fields and set the Short Text to Must Be Unique. I use forms to enter new records, how do I block a user from entering a duplicate record on a Form entry? Doesn’t seem to work for me. It let’s me create duplicate entries.

Facing the same issue. Any solution found for this yet?

check there