From 5c36bbf86fdf3622f323d7cf3f67b73f76892113 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 5 Jan 2023 19:11:54 +0000 Subject: [PATCH] case 4372 --- ayanova/src/components/custom-fields-control.vue | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/ayanova/src/components/custom-fields-control.vue b/ayanova/src/components/custom-fields-control.vue index e3f177cb..2d9536bc 100644 --- a/ayanova/src/components/custom-fields-control.vue +++ b/ayanova/src/components/custom-fields-control.vue @@ -384,9 +384,18 @@ export default { // - CURRENT TIME, DATE, DATETIME are pretty specific but all use a datetime string so any value not datetime like should be nulled // - CURRENT NUMBER, CURRENCY are also pretty specific but easy to identify if not fully numeric and then sb nulled or attempt to convert then null if not - const ctrlType = this.$store.state.formCustomTemplate[this.formKey].find( - z => z.dataKey == dataKey - ).type; + //case 4372 + let ctrlType = null; + if (this.keyStartWith != "") { + ctrlType = this.$store.state.formCustomTemplate[this.formKey].find( + z => z.dataKey == dataKey && z.fld.includes(this.keyStartWith) + ).type; + } else { + //single custom control form + ctrlType = this.$store.state.formCustomTemplate[this.formKey].find( + z => z.dataKey == dataKey + ).type; + } //First get current value for the data that came from the server let ret = cData[dataKey];