Expand my Community achievements bar.

SOLVED

How to make a field unique?

Avatar

Level 6

Since Recipients table already has a PK, I cannot make my field a PK so it is unique.

So I cannot use:

  • autopk (boolean): if this option is activated (autopk=“true”), a unique key will be automatically defined. This option may only be used on the main element of the schema. Warning, Adobe Campaign only guarantees that the key generated is unique. It is not guaranteed that the key values are consecutive and incremental.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @god_prophet ,

You can create dbindex for your attribute and mention unique="true"

Example,

<dbindex name="myIndex" unique="true">

      <keyfield xpath="@myField"/>

  </dbindex>  

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @god_prophet ,

You can create dbindex for your attribute and mention unique="true"

Example,

<dbindex name="myIndex" unique="true">

      <keyfield xpath="@myField"/>

  </dbindex>