Hi Bram,
I guess this is what your are looking for:
handler bram type RUIhandler {initialUI = [ ui ], onConstructionFunction = start } ui Div{ children = [] }; function start() recA RandomRecord{ a = 1, b = "In a galaxy far, far away" }; recB RandomRecord{ a = 1, b = "In a galaxy far, far away" }; if (equal(recA as any, recB as any)) SysLib.writeStdout("equal" ); else SysLib.writeStdout("not equal" ); end recA = new RandomRecord{ a = 1, b = "May the force be with you" }; recB = new RandomRecord{ a = 1, b = "May the force be with me?" }; if (equal(recA as any, recB as any)) SysLib.writeStdout("equal" ); else SysLib.writeStdout("not equal" ); end end function equal(record1 any in, record2 any in) returns(boolean) isEqual boolean = true; dicRecord1 Dictionary{}; dicRecord2 Dictionary{}; ServiceLib.convertFromJSON(ServiceLib.convertToJSON(record1), dicRecord1); ServiceLib.convertFromJSON(ServiceLib.convertToJSON(record2), dicRecord2); fieldsRecord1 string[] = dicRecord1.getKeys(); for (i int from 1 to fieldsRecord1.getSize()) if (dicRecord2.containsKey(fieldsRecord1[i]) and dicRecord1[fieldsRecord1[i]] != dicRecord2[fieldsRecord1[i]]) isEqual = false; exit for; end end return (isEqual); end endrecord RandomRecord type BasicRecord a int; b String; end With kind regards,
Guus
gweis