Topic Options
Rate This Topic
#137855 - 06/01/07 03:06 AM Unique field *
Alexander Offline
Stealth Member

Registered: 04/03/07
Posts: 11
Loc: Moscow, Russia
Hi everybody,

How can I make a unique field, i.e. I want to have unique ContractNumber in my workflow..

Thanks a lot =)
_________________________
'The_sun' = $Shining$ AND 'The_weather' = $sweet$
^_^

Top
#137857 - 06/01/07 04:56 AM Re: Unique field [Re: Alexander]
Vishwas P Offline
Stealth Member

Registered: 01/15/07
Posts: 125
Create a unique index on that field in that form.

Top
#137861 - 06/01/07 05:18 AM Re: Unique field [Re: Vishwas P]
Alexander Offline
Stealth Member

Registered: 04/03/07
Posts: 11
Loc: Moscow, Russia
O! of course... just black-out in my mind ;\)

thanks a lot!
_________________________
'The_sun' = $Shining$ AND 'The_weather' = $sweet$
^_^

Top
#137975 - 06/12/07 11:39 PM Re: Unique field [Re: Alexander]
Regen Offline
Stealth Member

Registered: 06/12/07
Posts: 45
Loc: Bulgaria
Hello! I am a "Remedy Beginner" so I apologize for this question, but can you please explain how the unique field is done?
(I'm setting it through the index tab in the form properties dialog, but nothing happens.) Should the field be character, integer, e.t.c. Is it a special way of pushing it into the database?
Greetings,
Andrei
_________________________
Muf!

Top
#137976 - 06/13/07 01:05 AM Re: Unique field [Re: Regen]
Vishwas P Offline
Stealth Member

Registered: 01/15/07
Posts: 125
Check the Unique (checkbox) on the Index tab.

If you have composite index (multiple fields for same index) then the combination will be unique indexed and not each field.

Top
#137977 - 06/13/07 01:29 AM Re: Unique field [Re: Vishwas P]
Regen Offline
Stealth Member

Registered: 06/12/07
Posts: 45
Loc: Bulgaria
I am checking the same checkbox after I add it in the index field and when I launch the form, nothing happens. After I push the field and look into the database it's value is also Null. Where might I be wrong?
Sorry for the inconvenience,
Andrei.
_________________________
Muf!

Top
#137981 - 06/13/07 04:34 AM Re: Unique field [Re: Regen]
Vishwas P Offline
Stealth Member

Registered: 01/15/07
Posts: 125
Aftr u create a Unique index, nothing hapns 2 d form (no UI changes) however @backend, Unique index wil b created...

u cnt push NULL value, more than once(this voilates Unique clause).. try creating d same entry twice, u'l get an error msg...

Top
#137987 - 06/13/07 06:36 AM Re: Unique field [Re: Vishwas P]
Regen Offline
Stealth Member

Registered: 06/12/07
Posts: 45
Loc: Bulgaria
I see.. So that Happens. The database field is shown as Unique Index, but it's either left blank or the PL/SQL does not show it's value for the different rows. When I try to withdraw it's value from the database with the form, it's content is also shown as blank.
Isn't it supposed to have an autogenerated value (something like S9998) that I can use for a unique Id for further actions?
Where am I wrong?
Andrei
_________________________
Muf!

Top
#137989 - 06/13/07 06:48 AM Re: Unique field [Re: Regen]
Vishwas P Offline
Stealth Member

Registered: 01/15/07
Posts: 125
Unique Index (or even Unique constraint in SQL) doesnt mean a default value for that column.
If you are looking for a default value, set a default value in the field properties (this cannot be unique indexed).

Top
#137990 - 06/13/07 06:54 AM Re: Unique field [Re: Vishwas P]
Regen Offline
Stealth Member

Registered: 06/12/07
Posts: 45
Loc: Bulgaria
I see. So is there a way that can I generate a unique value for a form field - so I can identify a record with it(except the request_id field)?


Edited by Regen (06/13/07 06:55 AM)
_________________________
Muf!

Top