Comparing two arrays

Hi,

I have a requirement of displaying an Audit Trail comparing two arrays; Original and updated as follows:

Original Array:

[Id=15, PS_Username=VGAN, PS_Fullname=Veron Ganguly], [Id=18, PS_Username=CZUCKERT, PS_Fullname=Curt Zuckert], [Id=28, PS_Username=KDUENNHA, PS_Fullname=Karen Duennhaupt], [Id=31, PS_Username=LSWENSON, PS_Fullname=Liz Swenson], [Id=38, PS_Username=POTENKHI, PS_Fullname=Tatiana Potekhina], [Id=40, PS_Username=TCHAN, PS_Fullname=Tiffany Chan], [Id=41, PS_Username=TSTAPLES, PS_Fullname=Tina Staples], [Id=95, PS_Username=MONGEL, PS_Fullname=Geller], [Id=96, PS_Username=CBI, PS_Fullname=Chand]

Updated Array:

[Id=96, PS_Username=CBI, PS_Fullname=Chandler Bing]

So the audit trail should display:

PS_Fullname: Original value: Chand; Updated Value: Chandler Bing

TIA :)

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    The way I'd implement this would vary depending on particular requirement details that you haven't provided yet as far as I can see.  Just two remaining questions I have, for example:

    1) Will the "updated array" being compared really just be one item from the original array, was that just for illustration purposes and the real comparison would be against the full updated array of CDTs?

    2) Will the comparison always assume that one array member is updated or will it need to handle multiple updated members?

Reply
  • 0
    Certified Lead Developer

    The way I'd implement this would vary depending on particular requirement details that you haven't provided yet as far as I can see.  Just two remaining questions I have, for example:

    1) Will the "updated array" being compared really just be one item from the original array, was that just for illustration purposes and the real comparison would be against the full updated array of CDTs?

    2) Will the comparison always assume that one array member is updated or will it need to handle multiple updated members?

Children
No Data