Multiple Field Unique Values

Confluence User - 20 Jul, 2015

Hi,

 

Is there a way to prevent insertion of values with unique constraints.

as an example i have 2 fields name and location

and name = abc location = test already exist

it should prevent insertion of name=abc location=test if inserted again, but should allow if any of the field value is different.

I have tried to achieve it using database unique constraint but that shows unfriendly message at user end.

 

Thanks in advance for your help.

forms

2


24 Jul, 2015
confluenceUser
confluenceUser

Hi Jahan,

we have some thought.
in the past to solve this, i've made two form with different table name..
first form for field name and location in table A.
second form for the other field in table B.

so, id (primary key) in table A will become foreign key in table B (make some column).

That's it.

any other solution?

27 Jul, 2015
confluenceUser
1
confluenceUser

Actually it won't work in my case as i have composite key.

The solution i have adopted was added a unique constraint on DB side; when some one tries to insert duplicate row; joget show some weird duplicate message, so using Jquery i changed that message to my own needed one.

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print