@magic-xpa/engine 4.1100.0-dev4110.243 → 4.1100.0-dev4110.244

Sign up to get free protection for your applications and to get access to all the features.
@@ -686,6 +686,22 @@ export class Record {
686
686
  }
687
687
  return true;
688
688
  }
689
+ getUpdatedFields() {
690
+ let dv = this._dataview;
691
+ let originalRec = dv.getOriginalRec();
692
+ let size = this.getSizeFld(false);
693
+ let start = this.getFromFldIdx(false);
694
+ let fields = [];
695
+ let tableName = this.getFieldsTab().getField(0).getTableName();
696
+ for (let i = 0; i < start + size; i++) {
697
+ const field = this.getFieldsTab().getField(i);
698
+ if (!this.fldValsEqual(originalRec, i)) {
699
+ fields.push(' ' + field.getCtrl().getName());
700
+ }
701
+ }
702
+ if (fields.length > 0)
703
+ return tableName + ':' + fields.toString();
704
+ }
689
705
  fldValsEqual(rec, fldIdx) {
690
706
  let type = this.getFieldsTab().getField(fldIdx).getType();
691
707
  return ExpressionEvaluator.mgValsEqual(this.GetFieldValue(fldIdx), this.IsNull(fldIdx), type, rec.GetFieldValue(fldIdx), rec.IsNull(fldIdx), type);
@@ -863,4 +879,4 @@ export class DcValuesReference extends ObjectReferenceBase {
863
879
  return new DcValuesReference(controlId, dcValuesOwner.getDcValues(dcId));
864
880
  }
865
881
  }
866
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVjb3JkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZW5naW5lL3NyYy9kYXRhL1JlY29yZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wscUJBQXFCLEVBRXJCLFdBQVcsRUFDWCxNQUFNLEVBR04sbUJBQW1CLEVBQ25CLDBCQUEwQixFQUMxQixXQUFXLEVBQ1osTUFBTSxnQkFBZ0IsQ0FBQztBQUN4QixPQUFPLEVBQ0wsb0JBQW9CLEVBRXBCLEtBQUssRUFDTCxtQkFBbUIsRU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