Hi there, Try to achieve: Compare individual attributes value within

Hi there,
Try to achieve:
Compare individual attributes value within same element between two CDT instances. For example, CDT[1].field1=CDT[2].field1 AND CDT[1].field2=CDT[2].field2 AND CDT[1].field3=CDT[1].field3 AND ...
Method has been Tried:
Use tostring to convert CDT into mutiple values text PV array via striping off "[,]" and splitting with ",". It returns as an array of {field1=value1,field2=value2,field3=value3....}. Use text set function to find out the diffence array of two CDT instances.
Problem:
It will break into unexpected extra CDT elements when there is/are one or more "," (comma) characters within CDT element values.
Appian Version: 7.6;
Help please:
Are there any other ways to achieve this?

Many thanks/Henry...

OriginalPostID-121643

OriginalPostID-121643

  Discussion posts and replies are publicly visible

Parents
  • Sorry for late response.
    It works using straight comparison: if cdt[1]=cdt[2] if you find if cdt level value changed.
    The inital proposal of my post works well if there are no any CDT attribute contains wiht comma (",") characters since it will mismatch numbers of attributes between CDT instances. So, I still don't find ideal solution for my requirement.
    Thanks/Henry
Reply
  • Sorry for late response.
    It works using straight comparison: if cdt[1]=cdt[2] if you find if cdt level value changed.
    The inital proposal of my post works well if there are no any CDT attribute contains wiht comma (",") characters since it will mismatch numbers of attributes between CDT instances. So, I still don't find ideal solution for my requirement.
    Thanks/Henry
Children
No Data