From 96db9b81b1cf326471fd5bb95cef80fa66e0839c Mon Sep 17 00:00:00 2001 From: Aaron Lozier Date: Mon, 25 Jan 2021 15:58:56 -0700 Subject: [PATCH] PG-37/PG-81 - Implement getCurrentSublistSubrecord --- modules/SS2/Record.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/SS2/Record.js b/modules/SS2/Record.js index 770053d..4f0d981 100644 --- a/modules/SS2/Record.js +++ b/modules/SS2/Record.js @@ -235,6 +235,13 @@ module.exports = class Record { return this.sublists[sublistId][line][fieldId]; } + + getCurrentSublistSubrecord(options){ + if (typeof options.sublistId === 'undefined' || typeof this.currentLines[options.sublistId] === 'undefined') { + return undefined; + } + return this.getSublistSubrecord(Object.assign(options, { line: this.currentLines[options.sublistId] })); + } cancelLine(options) {} commitLine(options) {} @@ -242,7 +249,7 @@ module.exports = class Record { getCurrentMatrixSublistValue(options){} getCurrentSublistField(options){} getCurrentSublistIndex(options){} - getCurrentSublistSubrecord(options){} + getCurrentSublistText(options){} getCurrentSublistValue(options){} getField(options){}