Skip to main content
varunb579494
December 22, 2022
Question

Is there any way to compare two record values of same record type to find the difference?

  • December 22, 2022
  • 7 replies
  • 0 views

I have the requirement to find the difference between two record values of a record type like we do in case of cdts using cdtdifference(). I have the previous value of record type and then new value, I need to populate Audit table using these difference values.

Any function like cdtdifference() or any workaround to do this?

7 replies

sreesudhak2721
July 13, 2023

Any suggestions for this, we need it for the same purpose

mathieud0001
Brainy
July 13, 2023

There's this plugin:

[View:https://community.appian.com/b/appmarket/posts/cdt-diff-utilities]

But you can also do the same with a!forEach that iterates over the attributes (using a!keys) on the CDT or Record.

ignacio.moran
July 14, 2023

What I propose is: 

  1. Create a CDT with the same structure as the record
  2. Create a rule to find the difference between records, in this rule:
    1. Cast your record rule inputs to the CDT you have created (docs.appian.com/.../Casting.html
    2. use the function cdtdifference()
    3. Call a process model which saves the output of the function to the audit database table as you want. 
varunb579494
July 14, 2023

[mention:c5a59c6aa7e54bd3bdd7d12a23b7f262:e9ed411860ed4f2ba0265705b8793d05]  I also achieved my requirement using the method [mention:d7d4a133d1d14fbbb2fa42748b63d27d:e9ed411860ed4f2ba0265705b8793d05]  suggested. There is no direct function to compare records.

sreesudhak2721
July 14, 2023

Correct, I wanted to know if there is a direct function like this for records. But seems like there is none. Will convert it to CDT and then use it. 

Record Events might be an option as well.

Thanks for your responses.Appreciate it.