Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Sequence Generation for a particular attribute

Avatar

Avatar
Boost 1
Level 1
zebashaikhh
Level 1

Like

1 like

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
zebashaikhh
Level 1

Like

1 like

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
zebashaikhh
Level 1

02-12-2018

Hi,

       I want to create sequence logic for a particular attribute of the schema. When I am trying to create it with the existing solution its creating a new attribute(Primary Key/ @id) and generating the sequence logic on that attribute. As per the requirement sequence should be created with the current primary key of the table for eg  recommendation Id. It shouldn't create a new attribute.

Will be grateful if you can provide me with a solution

Thank You

Zeba Shaikh

Replies

Avatar

Avatar
Validate 250
Level 10
pablo_rosero1
Level 10

Likes

81 likes

Total Posts

348 posts

Correct Reply

77 solutions
Top badges earned
Validate 250
Validate 100
Validate 50
Validate 25
Validate 10
View profile

Avatar
Validate 250
Level 10
pablo_rosero1
Level 10

Likes

81 likes

Total Posts

348 posts

Correct Reply

77 solutions
Top badges earned
Validate 250
Validate 100
Validate 50
Validate 25
Validate 10
View profile
pablo_rosero1
Level 10

02-01-2019

Hi Zeba,

Depending on what you're trying to accomplish, a way to do it is to keep the primary key using an Intersection.

See here: Adobe Campaign Help | Intersection

Hope this helps!

All the best,

Pablo

Avatar

Avatar
Contributor
MVP
wodnicki
MVP

Likes

938 likes

Total Posts

1,061 posts

Correct Reply

495 solutions
Top badges earned
Contributor
Shape 1
Give Back 100
Give Back 50
Give Back 25
View profile

Avatar
Contributor
MVP
wodnicki
MVP

Likes

938 likes

Total Posts

1,061 posts

Correct Reply

495 solutions
Top badges earned
Contributor
Shape 1
Give Back 100
Give Back 50
Give Back 25
View profile
wodnicki
MVP

02-01-2019

Hi,

If you're trying to use an existing pk instead of autogenerated surrogate pk:

  1. Remove autopk="true" from root <element/>
  2. Add this as the first node under root <element/>, assuming @recommendationId is the table's pk:

    <key name="pk" internal="true">

      <keyfield xpath="@recommendationId"/>

    </key>

Thanks,

-Jon

Avatar

Avatar
Boost 1
Level 1
zebashaikhh
Level 1

Like

1 like

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
zebashaikhh
Level 1

Like

1 like

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
zebashaikhh
Level 1

24-01-2019

Hi,

   Thank you for your help

But we used an inbuilt syntax that can be used to auto create the sequence and the syntax is mentioned below

Inside the element we mentioned autopk="true" and pkSequence="auto_internalNameOfSchema_seq" which helps to create auto sequence starting from 1000 

Example-

<element autopk="true" label="Merchant Master" labelSingular="Merchant Master"

           name="mrchntMaster" pkSequence="auto_mrchntMaster_seq">

<attribute label="Merchant ID" name="id"/>

</element>

Note- It is possible with latest v7 and build 8949

Avatar

Avatar
Boost 1
Level 1
zebashaikhh
Level 1

Like

1 like

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
zebashaikhh
Level 1

Like

1 like

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
zebashaikhh
Level 1

24-01-2019

Hi,

   Thank you for your help

But we used an inbuilt syntax that can be used to auto create the sequence and the syntax is mentioned below

Inside the element we mentioned autopk="true" and pkSequence="auto_internalNameOfSchema_seq" which helps to create auto sequence starting from 1000 

Example-

<element autopk="true" label="Merchant Master" labelSingular="Merchant Master"

           name="mrchntMaster" pkSequence="auto_mrchntMaster_seq">

<attribute label="Merchant ID" name="id"/>

</element>

Note- It is possible with latest v7 and build 8949