I used formatting in webmap, Smart Editor Json configuration . But it still showing with comma for integer and double field type values .
@vijaybadugu This issue should now be resolved in the latest updates of the Smart Editor in ArcGIS Online. The Smart Editor Widget: Two Years in Review - Esri Community
_showFeature: function (b, c) { if (b) { this._currentFeature = b; c = c ? c : b.getLayer(); var e = c.getEditCapabilities({ feature: b, userId: this._userIds[c.id] }); this._canUpdate = e.canUpdate; this._canDelete = e.canDelete; if (e = this._getLInfoFromFeatureLayer(c)) { this._setCurrentLInfo(e); var g = b.attributes, k = this._findFirst(e.types, "id", g[e.typeIdField]), f = null; n.forEach(e.fieldInfos, function (b) { f = b.field; var c = []; b.dijit && 1 < b.dijit.length ? n.forEach(b.dijit, function (a) { c.push(a) }) : c.push(b.dijit); n.forEach(c, p.hitch(this, function (b) { if (b) { var c = this._setFieldDomain(b, k, f), e = g[f.name], e = e && c && c.codedValues && c.codedValues.length ? c.codedValues ? c.codedValues.name : e : e; a.isDefined(e) || (e = ""); "dijit.form.DateTextBox" === b.declaredClass || "dijit.form.TimeTextBox" === b.declaredClass ? e = "" === e ? null : new Date(e) : "dijit.form.FilteringSelect" === b.declaredClass && (b._lastValueReported = null, e = g[f.name] + ""); try { this._setValue(b, e), "dijit.form.FilteringSelect" === b.declaredClass && !1 === b.isValid() && this._setValue(b, null) } catch (la) { b.set("displayedValue", this.NLS_errorInvalid, !1) } } })) }, this); this._attachmentEditor && e.showAttachments && this._attachmentEditor.showAttachments(this._currentFeature, c); (b = c.getEditSummary(b)) ? (this.editorTrackingInfoDiv.innerHTML = b, d.show(this.editorTrackingInfoDiv)) : d.hide(this.editorTrackingInfoDiv) } }},
You can add the code in Highlighted in bold
This is what I was able to find in the Widget.js
_showFeature: function (b, c) { if (b) { this._currentFeature = b; c = c ? c : b.getLayer(); var e = c.getEditCapabilities({ feature: b, userId: this._userIds[c.id] }); this._canUpdate = e.canUpdate; this._canDelete = e.canDelete; if (e = this._getLInfoFromFeatureLayer(c)) { this._setCurrentLInfo(e); var g = b.attributes, k = this._findFirst(e.types, "id", g[e.typeIdField]), f = null; n.forEach(e.fieldInfos, function (b) { f = b.field; var c = []; b.dijit && 1 < b.dijit.length ? n.forEach(b.dijit, function (a) { c.push(a) }) : c.push(b.dijit); n.forEach(c, p.hitch(this, function (b) { if (b) { var c = this._setFieldDomain(b, k, f), e = g[f.name], e = e && c && c.codedValues && c.codedValues.length ? c.codedValues ? c.codedValues.name : e : e; a.isDefined(e) || (e = ""); "dijit.form.DateTextBox" === b.declaredClass || "dijit.form.TimeTextBox" === b.declaredClass ? e = "" === e ? null : new Date(e) : "dijit.form.FilteringSelect" === b.declaredClass && (b._lastValueReported = null, e = g[f.name] + ""); try { this._setValue(b, e), "dijit.form.FilteringSelect" === b.declaredClass && !1 === b.isValid() && this._setValue(b, null) } catch (la) { b.set("displayedValue", this.NLS_errorInvalid, !1) } } })) }, this); this._attachmentEditor && e.showAttachments && this._attachmentEditor.showAttachments(this._currentFeature, c); (b = c.getEditSummary(b)) ? (this.editorTrackingInfoDiv.innerHTML = b, d.show(this.editorTrackingInfoDiv)) : d.hide(this.editorTrackingInfoDiv) } } },
I was unable to locate
n.forEach(d.fieldInfos, function(a) { m = a.field;
What version of WAB are you using. I am using 2.8 through Portal.
Thank you,
Best,
Heath
Thank you for your response. I assume this is the Widget.js file? What version of WAB are you using? Again thank you
IN showFeature function, Please add Highlighted In Bold below accordingly
_showFeature: function(b, c) { n.forEach(d.fieldInfos, function(a) { m = a.field; if ((a.type.indexOf("Integer") != -1) || ((a.type.indexOf("Double") != -1) && (a.name=="ID" ))) { if (a.dijit) a.dijit.constraints && (a.dijit.constraints.pattern = '#');
Hi Vijay,
I hope all is well. Would you be able to upload screen shots of the changes you made so that I may do the same?
Thank you.
I am have the same issue. What code change did you make and where can i find it?
Resolved with small code changes
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.