Expand my Community achievements bar.

SOLVED

1to many cardinality in Adobe campaign classic

Avatar

Level 4

hiaLL , please help

i have 2tabes --transaction table(ELC:TRANSACTION ) and receipeiNT(ELC:RECEIPIENT) table and i want to create 1to many link between them in schema

In 1 to Many cardinality,

the code should be written in Target (Many-N) schema.

In the below example, I have written the code in ELC:TRANSACTION schema.

 

<element label="Recipient" name="recipient" revLabel="Recipient Trnsaction" target="elc:recipient" type="link">

<join xpath-dst="@id" xpath-src="@irecipientid"/>

</element>

 

SO THE code should be written like that according to me but

what i found is another adobe doc where its defined in diff way:

LINK 

https://experienceleague.adobe.com/docs/campaign-classic/using/configuring-campaign-classic/editing-...

 

 

<element label="Recipient" name="lnkRecipient" revLink="lnkTransactions" target="elc:recipient" type="link"/>

 

please help me which one is correct method and what is the diff between the two

 

why so why it is using revlink.....we shoulsd use revlabel only

 

what and when we use revlink in schema

 

 

@isahore 

 

 

@AndreaBriceno

Topics

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Shrutii ,

 

You can refer to the below solved post for revLink usage 

 

https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-standard/usage-of-revlink-attribute-....

 

Also, we can create temporary 1 to many Link using Enrichment activity(useful in calculating aggregates or temporary values useful for that particular Workflow) but if you want you can do it from the Schema level so that its not required to create every time in the Workflow.

 

For this use case:

<element label="Recipient" name="lnkRecipient" revLink="lnkTransactions" target="elc:recipient" type="link"/>

 

If we mention type="link" without explicitly mentioning the Joining keys, then Adobe Campaign will automatically consider the primary keys (they should have the same Data type ) in both the Schemas as the Joining keys. You can check it it Preview Tab of the Schema after adding the Link and Update DB Structure.

 

Regards,

Pravallika.

 

View solution in original post

3 Replies

Avatar

Employee

Hi @Shrutii,

 

Links which we create in Adobe Campaign are basically join conditions which are enabled.
 
As per your case, each transaction has a mapped recipient record(1:1) and each recipient can have more than one transaction record.
 
When the link is created from transaction through the following code
 
<element label="Recipient" name="recipient" revLabel="Recipient Trnsaction" target="nms:recipient"
             type="link">
      <join xpath-dst="@id" xpath-src="@irecipientid"/>
    </element>
 
The link is created using the default revlink name of the source schema name which is transaction and also the fields id in recipient and irecipientid in transaction needs to be created upfront.
 
However, when the link is created from transaction through the following code
 
<element label="Recipient" name="lnkRecipient" revLink="lnkTransactions" target="elc:recipient" type="link"/>
 
The field irecipientid in transaction is automatically created and the rev link name as what you provide is used.
 
Additionally, the relink is the name that will be used in queries when the fields in the transaction are referenced from the recipient.

Avatar

Correct answer by
Community Advisor

Hi @Shrutii ,

 

You can refer to the below solved post for revLink usage 

 

https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-standard/usage-of-revlink-attribute-....

 

Also, we can create temporary 1 to many Link using Enrichment activity(useful in calculating aggregates or temporary values useful for that particular Workflow) but if you want you can do it from the Schema level so that its not required to create every time in the Workflow.

 

For this use case:

<element label="Recipient" name="lnkRecipient" revLink="lnkTransactions" target="elc:recipient" type="link"/>

 

If we mention type="link" without explicitly mentioning the Joining keys, then Adobe Campaign will automatically consider the primary keys (they should have the same Data type ) in both the Schemas as the Joining keys. You can check it it Preview Tab of the Schema after adding the Link and Update DB Structure.

 

Regards,

Pravallika.