How to make a field unique? | Community
Skip to main content
Level 6
December 19, 2024
Solved

How to make a field unique?

  • December 19, 2024
  • 1 reply
  • 472 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by ParthaSarathy

Hi @god_prophet ,

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

Example,

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

      <keyfield xpath="@myField"/>

  </dbindex>  

1 reply

ParthaSarathy
Community Advisor
ParthaSarathyCommunity AdvisorAccepted solution
Community Advisor
December 19, 2024

Hi @god_prophet ,

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

Example,

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

      <keyfield xpath="@myField"/>

  </dbindex>  

~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups