How to map CDT

Certified Associate Developer

Hello,

 

I have a requirement where I need to map data in one CDT to another. The two CDT's are as below

 

DS_SeparatedData which includes FieldIdentifier,DataValue,Datacaption and Keyidentifier - These values are coming from database, Now what I want is I want to map the value of FieldIdentifier and DattaValue manually from another variable. So my another variable would be: VD_SeparatedData which includes FieldIdentifier and DataValue. As per the value available in VD_SeparatedData variable, I want to update the value in DS_SeparatedData. for eg:

 Lets say my DS_SeparatedData consists of following value. i.e.

DS_SeparatedData

         FieldIdentifier:"Email"

         DataValue:abc@abc.com

         Datacaption: "Email ID"

        KeyIdentifier:2

 

VD_SeparatedData

       FieldIdentifier:"Email"

       DataValue:pqr@xyz.com

 

So I want DataValue in VD_SeparatedData variable to get updated in DS_SeparatedData as FieldIdentifier is same on both the variable. 

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Associate Developer
    in reply to mohamedt808
    Yes these two CDT's are multiple. Let me give a quick example


    CDT A:[Name=abc,Age=,Gender=Male],[Name=pqr,Age=,Gender=Female],[Name=xyz,Age=,Gender=Male] and so on.

    Similarly CDT B contains
    CDT B:[Name=abc,Age:40],[Name=jkl,Age:60],[Name=xyz,Age:20]

    As You can CDT A is my original CDT which contain all the columns whereas CDT B contains only 2 columns i.e Name and age. In CDT A you can see that "Age" property is blank. So what I need is that I need to update the values in CDT A with the matching values available in CDT B. My Final output would be something like

    [Name=abc,Age=40,Gender=Male],[Name=pqr,Age={Blank as no record for "pqr" is available in CDT B},Gender=Female],[Name=xyz,Age=20,Gender=Male] and so on.
Children