Expand my Community achievements bar.

SOLVED

Primary key internal equal to true

Avatar

Level 3
Level 3

Hi @ParthaSarathy 

Kindly explain the difference when we are using Internal =true while defining the key in schema and what will happen if we are not defining with an eg.

 

1. <key name="deptid"> <keyfield xpath="@deptid"/> </key>

2. <key name="deptid" internal="true"> <keyfield xpath="@deptid"/> </key>

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@KD1 , One observation is, In both cases the deptid will act as a primary key and it won't allow to insert a duplicate deptid record. However, If you define internal="true", then in Schema structure (in client console UI) you can able to see a key icon near to the attribute.

ParthaSarathy_0-1751281677211.png

If it is not defined, then you will find a red exclamation mark symbol near to the attribute. This might leads to a confusion for the campaign operator to understand which one is primary key. So, to avoid confusion be consistent in your schema definitions by adding internal="true" in primary key syntax.

View solution in original post

3 Replies

Avatar

Community Advisor

Hi @KD1 ,

internal="true" is mandatory to define an attribute as a primary key.

internal (boolean): if it is activated, this attribute lets Adobe Campaign know that the key is primary.

Reference document

Avatar

Level 3
Level 3

Hi @ParthaSarathy 

Request you to give an eg explaining using with and without internal=true in a schema

Avatar

Correct answer by
Community Advisor

@KD1 , One observation is, In both cases the deptid will act as a primary key and it won't allow to insert a duplicate deptid record. However, If you define internal="true", then in Schema structure (in client console UI) you can able to see a key icon near to the attribute.

ParthaSarathy_0-1751281677211.png

If it is not defined, then you will find a red exclamation mark symbol near to the attribute. This might leads to a confusion for the campaign operator to understand which one is primary key. So, to avoid confusion be consistent in your schema definitions by adding internal="true" in primary key syntax.