Task Based UI @ Siebel 7.8 | Next Tip »Home

How To make a Table column Unique.

OkAvarageGoodVery GoodExcellent (6 votes, average: 3.33 out of 5)
Loading ... Loading ...

This is quite rare requirement as you don’t create custom tables often in Siebel. But if you happen to do that then most probably you will want to make the some of the columns unique which will identify the record as unique.

Requirement:

Make two columns of a table unique . For example I created a table called CX_ERR_MSG and I would like the field ERR_CODE and ERR_LANG to be Unique so that no duplicate records can be created.

Solution:

The most obvious and least recommended solution of course is scripting. On Buscomp PreWrite event you check weather the values entered in the record are already existing or not.

Recommended Solution:

A better and recommended solution for this is to make the fields unique at database level. Here is Step by Step guide on making a coloumn unique at table level.

Download Guide

Let me know your views about the guide. It will help me to decide about my future posts.

  • Share/Bookmark

Related Posts


Article by neel

Authors bio is coming up shortly. neel tagged this post with: , Read 387 articles by neel
  • Swatee Jain
    Hi,

    I have created unique index on the db level but the problem is capturing the unique record error message and converting it to user friendly message. I tried try catch block on the pre write record level on bus comp but was not able to catch the error message generated by db unique index...Any idea how we can do this.

    Thanks
    swatee
  • MAFI
    ...but this only works on tables with no data in this table! Having a table already filled with some data and you want to add a unique field this solution doesnt work - no chance to create the new field as unique due to already existing data!

    Solution: use oracle-sequence-field
  • Deepak
    unable to download guide.
    Plz arrange alternate option for download
  • Severus
    Unable to download the file. The solution is to add an user key at the table and specify which columsn form a part of that key
  • Kapoor234
    That is fantastic....as a learner it helps me alot. Keep posting some good stuff like this. Thanks!
blog comments powered by Disqus

Polls

Do you like the new Comment System and new look to Site?

View Results

Loading ... Loading ...