We have a requirement for comparison of same record type data and get the difference of the data & columns. We are aware of "CDT Diff Utilities" which does the same operation and gives the expected output. However we are looking for similar way of plugin availability or workaround to achieve the desired functionality.
Note: We are not looking for manual comparison of the record fields and the data, as we need to perform the comparison across all record types in the application and it will be become very tedious process to achieve by manual comparison.
Discussion posts and replies are publicly visible
In my experience this is a fairly common use case during review cycles, where the reviewers of edits to a record want to see what changed in an easily digestible way. Whether it's implemented via formal audit tables (outside of or supplemental to Record Events) or something more ad hoc, my approach is generally the same. Here is some prototype code on my current project that we'll productionize in a couple of weeks.
Pre-requisites:
TCG_findData
index/wherecontains
index()
select
This could be made even better if there were an Appian function to return a record field's Display Name given just the record field rather than explicitly hardcoding it (e.g. the 25.2 feature), but so far I haven't been able to figure that out.
a!localVariables( local!fromKeys: a!defaultValue(ri!fields, a!keys(ri!fromData)), local!toKeys: a!defaultValue(ri!fields, a!keys(ri!toData)), rule!JS_rejectNull({ a!forEach( union(local!fromKeys, local!toKeys), a!localVariables( local!a: index(ri!fromData, fv!item, null), local!b: index(ri!toData, fv!item, null), local!referenceData: rule!TCG_findData( data_any: ri!referenceData, field_any: "field", value_any: fv!item, select_any: 1, ), a!match( value: null, whenTrue: and(a!isNullOrEmpty(local!a), a!isNullOrEmpty(local!b)), then: null, whenTrue: and( a!isNotNullOrEmpty(local!a), a!isNotNullOrEmpty(local!b), local!a = local!b, ), then: null, default: a!map( field: rule!JS_pascalToReadable(tostring(fv!item)), from: if( a!isNullOrEmpty(local!referenceData), tostring(a!defaultValue(index(ri!fromData, fv!item, null),"---")), rule!TCG_findData( data_any: local!referenceData.data, field_any: local!referenceData.idField, value_any: index(ri!fromData, fv!item, null), select_any: local!referenceData.labelField, )[1] ), to: if( a!isNullOrEmpty(local!referenceData), tostring(a!defaultValue(index(ri!toData, fv!item, null),"---")), rule!TCG_findData( data_any: local!referenceData.data, field_any: local!referenceData.idField, value_any: index(ri!toData, fv!item, null), select_any: local!referenceData.labelField, )[1] ), ), ) ) ), }) )