Getting data in one table using data of another table using enrichment | Community
Skip to main content
Employee
July 18, 2022
Solved

Getting data in one table using data of another table using enrichment

  • July 18, 2022
  • 2 replies
  • 901 views

Hi everyone, I have two tables ( History and other is recipient). History schema has attributes- booking date, nameid and tour cd while Recipient has attribute - nameId,lastTourCode and LastTourDate. So, in My history worklfow, i want to implement a use case in which i have recipient's last tourDate should be equal to the latest booking date ( booking date is present in history schema) and recipients LastTourCode should be equal to the tour code corresponding to the latest booking date. 
I am unable to this, after update activity , when i am using enrichment and selecting nameid (for grouping records) and then using aggregate function to get the maximyum booking date , it is giving me zero records. 

Can anyone help?

 

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 Kishore_Padamata

Hello @smritifotedar 
Have you tried with RowNum function
https://experienceleague.adobe.com/docs/campaign-standard/using/managing-processes-and-data/filtering-data/list-of-functions.html?lang=en#representation
@rank as RowNum(PartitionBy(<recipient identifier>), OrderBy(Desc(<booking date>)))

Then, filter @rank = 1

Hope this helps!

2 replies

Sukrity_Wadhwa
Employee
July 28, 2022

Was the given solution helpful to resolve your query or do you still need more help here? Do let us know.

Thanks!

Sukrity Wadhwa
Kishore_Padamata
Kishore_PadamataAccepted solution
Employee
July 20, 2022

Hello @smritifotedar 
Have you tried with RowNum function
https://experienceleague.adobe.com/docs/campaign-standard/using/managing-processes-and-data/filtering-data/list-of-functions.html?lang=en#representation
@rank as RowNum(PartitionBy(<recipient identifier>), OrderBy(Desc(<booking date>)))

Then, filter @rank = 1

Hope this helps!