Skip to main content
Nintex Community Menu Bar
Question

Uncaught TypeError: Cannot read property 'hasChanged' of undefined

  • Jul 9, 2024 5:09 PM UTC
  • 29 replies
  • 180 views
  • Translate All

Forum|alt.badge.img+18

Blank screen on page load, with this error. Any ideas?

94fdd5dfac80c150bf7904f4f5095021f8dba2ed.jpg

29 replies

Forum|alt.badge.img+20

I’m not a master of javascript debugging but the last line jumps out to me. Click on it and take another screenshot of the source code surrounding line 82.

Translate

Forum|alt.badge.img+18
  • Author
  • Jul 9, 2024 6:22 PM UTC

You asked for it 😉

Here are the contents of line 82. Looks like the XML for the entire page.

skuid.component.factory('#skuid-page-a0fF00000092AN2IAM-component-1','{{Name}}STD ProcessInteractionPatientCaseInteractionsTableRelatedPersonSTDSTDTestPatientCaseInteractionRelatedPersonPatientSTDCategoryPurposeTypePermission to Say &quot;CompassCare&quot;Other RelationshipInsert List of STD Tests here for RN to review with Patient.Anal Sex Given (M)Anal Sex Received (M/F)Vaginal Sex Given (M)Vaginal Sex Received (F)Oral Sex Given (M/F)Oral Sex Received (M/F)Other STD&lt;h1&gt;STD History&lt;/h1&gt;&lt;strong&gt;Test&lt;/strong&gt;&lt;strong&gt;Results&lt;/strong&gt;&lt;strong&gt;Reported to Patient&lt;/strong&gt;&lt;strong&gt;Reported to Health Dept.&lt;/strong&gt;&lt;strong&gt;Treatment&lt;/strong&gt;&lt;h1&gt;Physicians&lt;/h1&gt;Description{{Description1__c}} {{Description2__c}}Address&lt;h1&gt;Insurance&lt;/h1&gt;Description&lt;h1&gt;Additional Referrals&lt;/h1&gt;Description{{Description1__c}} {{Description2__c}}AddressOther Religious Background&lt;h1&gt;MotherCare&lt;/h1&gt;Address<custom name="scriptJTex
Translate

Forum|alt.badge.img+18
  • Author
  • Jul 9, 2024 6:22 PM UTC

Looking again, it’s not all the XML, just everything inside .

Hence the name “skuid.component.factory” I presume.

Translate

Forum|alt.badge.img+20

hehehe… a screenshot. Not copy paste.

Translate

Forum|alt.badge.img+18
  • Author
  • Jul 9, 2024 6:22 PM UTC

😉 While we’re at it, here’s line 28 of skuid__SkuidJS, which is throwing the error:

W=new a.model.Condition,W.operator="gte",W.field=Y,W.inactive=!0,W.name=Z,W.encloseValueInQuotes=!1,X=new a.model.Condition,X.operator="lte",X.field=Y,X.inactive=!0,X.name=$,X.encloseValueInQuotes=!1,v.model.addCondition(W),v.model.addCondition(X)}if(d=v.model.getField(W.field),e=v.model.getField(X.field),!d||!e)return!1;var _,ab,bb=d.displaytype,cb=e.displaytype;W.inactive?_="":"DATETIME"===bb?(i=q(W.value),_=r(i)):(i=p(W.value),_=W.value),X.inactive?ab="":"DATETIME"===cb?(j=q(X.value),j.setDate(j.getDate()-1),ab=r(j)):(j=p(X.value),ab=X.value);var db=function(){eb.datepicker("getDate")||fb.datepicker("getDate")?pb.show():pb.hide()},eb=A.DATE.edit({value:_,onChange:db}).addClass("sk-timefilter-input"),fb=A.DATE.edit({value:ab,onChange:db}).addClass("sk-timefilter-input");v.element.addClass("nx-actionselect nx-conditiontoken");var gb,hb,ib=l("
"),jb=l("
").addClass("nx-actionselect-text").append(ib),kb=l("
").addClass("nx-actionselect-arrow").append(l("
")),lb=l("
").addClass("nx-actionselect-dropdown sk-timefilter-body").hide(),mb=l("
").text(t("start_date")).addClass("sk-timefilter-label"),nb=l("
").text(t("end_date")).addClass("sk-timefilter-label"),ob=l("
"),pb=l("
").addClass("sk-timefilter-clearfilter-button").text("Clear Filter");pb.click(function(){eb.datepicker("setDate",null),fb.datepicker("setDate",null),db()}),B?(hb=l("
").text(t("done")).addClass("sk-timefilter-button"),ob.append(hb)):(gb=l("
").text(t("cancel")).addClass("sk-timefilter-button-grey"),hb=l("
").text(t("apply")).addClass("sk-timefilter-button"),ob.append(hb,gb)),v.updateDisplayValue=function(b,c){var d,e=o.makeFormattedDateFromJS,f=a.label.merge;return d=b&&c?e(b)+" - "+e(c):b&&!c?f(t("after_this"),e(b)):!b&&c?f(t("before_this"),e(c)):t("all_time"),ib.text(d),eb.datepicker("setDate",b),fb.datepicker("setDate",c),db(),v},v.updateDisplayValue(i,j),gb&&gb.click(function(){lb.hide("fast")}),v.activateFilter=function(){var a,b,c=eb.datepicker("getDate"),d=fb.datepicker("getDate");if(c&&(a=r(c)),d&&(b=r(d)),a?("DATETIME"===bb&&(a=s(p(a))),v.model.setCondition(W,a,v.affectCookies)):v.model.deactivateCondition(W,v.affectCookies),b){if("DATETIME"===cb){var e=p(b);e.setDate(e.getDate()-0+1),b=s(e)}v.model.setCondition(X,b,v.affectCookies)}else v.model.deactivateCondition(X,v.affectCookies);v.setOriginalValue({start:c,end:d})},hb.click(function(){var a=eb.datepicker("getDate"),b=fb.datepicker("getDate");B?v.list.showFilterActions():(v.activateFilter(),v.executeFilter()),v.updateDisplayValue(a,b),lb.hide("fast")}),lb.append(mb,eb,nb,fb,pb,ob),v.element.addClass("nx-actionselect-haslabel").append(jb,kb,lb),jb.add(kb).click(function(){lb.is(":visible")?lb.toggle("fast"):(lb.css("min-width",Math.max(v.element.width(),180)+"px"),lb.show("fast"))})}"toggle"===x||"auto"!==C&&"manual"!==C||(h=l("
").addClass("nx-actionselect-label"),"auto"===C?"daterange"===x?f=d.label:c&&(f=c.label):"manual"===C&&(f=k.attr("label"),f&&(f=n.mergeAsTextInContext(f,{model:v.model}))),f&&(h.text(f),v.element.addClass("nx-actionselect-haslabel").prepend(h))),v.selectedItem||v.isMultiselect||(c&&v.isReferenceFilter?v.selectedItem=v.element.actionAutocomplete("getSelectedItem"):"daterange"===x?v.setOriginalValue({start:i,end:j}):v.selectedItem=v.element.actionSelect("getSelectedItem"))}function h(a){a=a||{};var b=this,e=a.grandparent,f=a.parent,g=a.model,h=a.element;b.model=g,e.css({overflow:"hidden","overflow-x":"hidden","overflow-y":"hidden"}),f.css({position:"relative","padding-left":"0px","padding-right":"0px",height:"100%"}),b.element=h.addClass("nx-queue").data("object",b).appendTo(f);var i=a.title?n.mergeAsText("model",a.title,{createFields:!0,registerFields:!1},g):"";b.header=l("
").addClass("nx-queue-header").attr({"aria-controls":h.prop("id")}),b.headerInner=l("
").addClass("nx-queue-header-inner").appendTo(b.header),b.titleBar=l("
").addClass("nx-queue-titlebar").appendTo(b.headerInner),(a.showSearchBox===!0||a.filtersXML&&a.filtersXML.children&&a.filtersXML.children().length>0)&&(b.titleIcon=l("
").addClass("ui-icon ui-icon-gear nx-queue-titleicon").on("click",function(){b.settingsBar.toggle(),b.element.css("border-top",b.header.height()+2+"px solid white")}).appendTo(b.titleBar)),b.titleText=l("
").text(i).addClass("nx-queue-titletext").appendTo(b.titleBar),b.settingsBar=l("
").addClass("nx-queue-settings").hide().appendTo(b.headerInner),f.append(b.element,b.header),b.editor=new c(b.element,{showSaveCancel:!1,buttonPosition:"block"});var j={};j.render=function(c){c.element.addClass("nx-queue-item");var d=l("
").addClass("nx-queue-item-inner").appendTo(c.element);a.tagRenderer&&a.tagRenderer(b.model,b.list,c,d)},b.views={standard:j},b.list=new d(b.editor,b.model,{views:b.views,listFilters:a.filtersXML,conditions:a.editorConditions,showSearchBox:a.showSearchBox,useSOSLSearch:a.useSOSLSearch,SOSLFields:a.SOSLFields,searchMethod:a.searchMethod||"server",searchConditionName:a.searchConditionName,tokenizeSearch:"undefined"!=typeof a.tokenizeSearch?a.tokenizeSearch:!0,searchPlaceholderText:a.searchPlaceholderText,delayFilterExecution:a.delayFilterExecution}),b.model.registerList(b.list),b.list.render(),b.list.attach();var k=this.list.editor.header;k.detach().appendTo(b.settingsBar),b.element.on("click.skuid",".nx-queue-item",function(b){var c=l(this).data("object");a.tagClickAction&&a.tagClickAction(c),b.stopPropagation()})}function i(a,b){b||(b={});var c=b.mode||"edit",d=l("
").addClass("nx-editor-contents nx-basicfieldeditor-section-body");return l.each(a,function(a,e){var f=l("
").addClass("nx-basicfieldeditor-item"),g=l("
").addClass("nx-basicfieldeditor-item-label").text(e.metadata.label).appendTo(f);e.mode=c,e.editable=e.metadata.editable,e.editor=b.editor,e.wrapperElement=f,e.labelElement=g,e.render(),f.append(e.element),d.append(f)}),d}function j(a,b,c){a&&(a.css("opacity",1).show(),b.text(c))}function k(a,b,c,d){a&&(b.text(c),0===d?a.hide():a.animate({opacity:"0"},d||500,function(){a.hide()}))}var l=a.$,m=a.ui={},n=a.utils,o=a.time,p=o.parseSFDate,q=o.parseSFDateTime,r=o.getSFDate,s=o.getSFDateTime,t=a.label.read,u=n.encodeHTML,v=n.decodeHTML,w=window.sforce&&sforce.one?sforce.one:!1,x=window.sforce&&sforce.console&&sforce.console.isInConsole()?sforce.console:!1;c.prototype.id=function(){return this._GUID},c.prototype.registerModel=function(a){var b=this,c=!a.hasChanged;b.models.push(a),a.registerEditor(b),b.options.showSaveCancel&&!b.submitbuttons&&(b.savebutton=l("
").addClass("sk-button-save").text(t("save")).skooButton({icon:"sk-icon-save",disabled:c}),b.cancelbutton=l("
").addClass("nx-button-secondary sk-button-cancel").text(t("cancel")).skooButton({icon:"sk-icon-cancel",disabled:c}),b.savebutton.on("click.skuid",function(){l(this).removeClass("ui-state-hover"),b.submitbuttons&&b.submitbuttons.filter(".ui-button").button("disable"),b.save()}),b.cancelbutton.on("click.skuid",function(){l(this).removeClass("ui-state-hover"),b.submitbuttons&&b.submitbuttons.filter(".ui-button").button("disable"),b.cancel()}),b.submitbuttons=b.savebutton.add(b.cancelbutton),b.submitwrapper.append(b.savebutton,b.cancelbutton))},c.prototype.registerList=function(a){this.lists.push(a),this.registerModel(a.model)},c.prototype.unregister=function(){var a=this;return a.lists&&a.lists.length&&l.each(a.lists,function(){this.unregister&&this.unregister()}),a.models&&a.models.length&&l.each(a.models,function(){this.unregisterEditor(a)}),a},c.prototype.hasModelWithChanges=function(){var a=this,b=!1;return l.each(a.models,function(){return this.hasChanged?(b=!0,!0):void 0}),b},c.prototype.handleChange=function(){var a=this;a.submitbuttons&&a.submitbuttons.filter(".ui-button").button("enable"),a.lists.length&&l.each(a.lists,function(a,b){b.disableFiltersAndSearch()})},c.prototype.clearMessages=function(){this.messages&&this.messages.empty()},c.prototype.handleMessages=function(a,b){var c=this;return c.messages?b&&b.initiatorId&&c._GUID!==b.initiatorId?!1:void l.each(a,function(a,b){var d="nx-message";"ERROR"===b.severity||"FATAL"===b.severity?d="nx-error":"WARNING"===b.severity&&(d="nx-warning");var e;try{e=c.messages.children("."+d).filter(":contains('"+n.escapeSelector(b.message)+"')")}catch(f){}if(e&&e.length)if(e.data("dupcount")){var g=parseInt(e.data("dupcount"),10)+1;e.children(".nx-dupcounter").text(g),e.data("dupcount",g)}else e.data("dupcount",2),e.prepend('
2
');else{var h=l("
").addClass(d);h.append("DUPLICATE_VALUE"===b.status?b.message:l("
").text(v(b.message))),h.on("click.skuid",function(){l(this).remove()}),c.messages.append(h)}}):!1},c.prototype.handleCancel=function(){var a=this,b=!1,c={};l.each(a.models,function(a,d){d.hasChanged&&(b=!0,c[d.id]=!0)}),b===!1&&(a.clearMessages(),a.submitbuttons&&a.submitbuttons.filter(".ui-button").button("disable")),a.lists.length&&l.each(a.lists,function(a,b){!b.model||b.model.id in c||b.enableFiltersAndSearch()})},c.prototype.handleSave=function(a){var b=!1,c={},d=this;l.each(d.models,function(a,d){d.hasChanged&&(b=!0,c[d.id]=!0)}),a?d.hideStatus(t("saved")):d.hideStatus("",0),d.clearMessages(),a&&!b&&d.submitbuttons&&d.submitbuttons.filter(".ui-button").button("disable"),!a&&b&&d.submitbuttons&&d.submitbuttons.filter(".ui-button").button("enable"),d.lists.length&&l.each(d.lists,function(a,b){!b.model||b.model.id in c||b.enableFiltersAndSearch()})},c.prototype.cancel=function(){a.model.cancel(this.models,{initiatorId:this._GUID})},c.prototype.save=function(b){b=b||{};var c="rollbackOnAnyError";!(c in b)&&c in this.options&&(b[c]=this.options[c]),this.setStatus(t("saving")),b.initiatorId=this._GUID,a.model.save(this.models,b)},c.prototype.setStatus=function(b){a.ui.setStatus(this.status,this.statustext,b)},c.prototype.hideStatus=function(b,c){a.ui.hideStatus(this.status,this.statustext,b,c)},c.prototype._createConditionsFromXml=function(a,b){return b&&a?b.createConditionsFromXml(a):void 0},d.prototype.id=function(){return this._GUID},d.prototype.unregister=function(){var b=this;return b.model&&b.model.unregisterList(b),b.renderedItems&&l.each(b.renderedItems,function(){this.unregister&&this.unregister()}),b.options.responsive&&a.responsive.unregisterGrid(b.id()),b},d.prototype.getSelectedItems=function(){var a=[];return l.each(this.renderedItems,function(b,c){c.selected&&a.push(c)}),a},d.prototype.unSelectAll=function(){l.each(this.renderedItems,function(a,b){b.selected&&(b.selected=!1)})},d.prototype.addSearchField=function(a,b){var c=this;if(a){var d,e=c.model.getField(a.id),f=e.displaytype;f in m.searchableDisplayTypes&&e.filterable&&(e.id in c.searchFieldsMap||(d=l.extend({},e),b&&(d.searchOperator=b),c.searchFields.push(d),c.searchFieldsMap[e.id]=d))}},d.prototype.addSearchSubField=function(a,b){var c=this;if("object"==typeof b&&(b=b.id),a&&b){var d=c.model.getField(b,a),e=d.displaytype;if(e in m.searchableDisplayTypes&&d.filterable){var f=c.searchSubFieldsMap[a],g=c.searchSubFields[a];f||(f=c.searchSubFieldsMap[a]={},g=c.searchSubFields[a]=[]),d.id in f||(f[d.id]=1,g.push(d))}}},d.prototype.addRequiredField=function(a){this.requiredFields[a.id]=a},d.prototype.removeRequiredField=function(a){delete this.requiredFields[a.id]},d.prototype.validateRequiredFields=function(){var a=this,b=[],c=a.model,d=a.requiredFields;return l.each(c.changes,function(e,f){if(!("__deleted"in f)){var g={severity:"ERROR",status:"REQUIRED_FIELD_MISSING",fields:[]},h=c.getRowById(e),i="",j=!1;h&&h.Id in a.renderedItems&&l.each(d,function(a,b){var d=c.getFieldValue(h,a,!0),e=(""===d||null===d)&&"BOOLEAN"!==b.displaytype;e&&(i&&(i+=", "),i+="["+b.label+"]",g.fields.push(b.label),j=!0)}),j&&(g.message=t("required_fields_have_no_value")+" "+i,b.push(g))}}),b},d.prototype.getView=function(a){return a||(a=this.currentView),this.views[a]},d.prototype.setUp=function(a){this.callViewOperation("setUp",a)},d.prototype.beforeRender=function(a){this.callViewOperation("beforeRender",a)},d.prototype.renderComplete=function(a){this.callViewOperation("renderComplete",a)},d.prototype.tearDown=function(a){this.callViewOperation("tearDown",a)},d.prototype.callViewOperation=function(a,b){b||(b=this.getView()),b&&a&&a in b&&b[a](this)},d.prototype.getAllRows=function(){var a,b,c=this;return c.conditions?a=n.filterRowsByConditions(c.model.data,c.conditions):(a=[],c.model.data&&c.model.data.length&&l.each(c.model.data,function(b,c){a.push(c)})),c.customFilter&&c.customFilterValue&&(b=[],l.each(a,function(){c.customFilter(c.customFilterValue,this)&&b.push(this)}),a=b),a},d.prototype.render=function(b){b=b||{};var c,d,e=this,f=e.options,g=[],h=b.previousView||!1,i=h&&h!==e.currentView,j=e.getView(),k=!e.element||b.doNotCache||j.alwaysFullRender,m=b.changedRows;j.alwaysFullRender&&(b.doNotCache=!0),i&&(h=e.getView(h),h&&e.tearDown(h)),b.resetPagination&&(e.currentPage=0),d=e.getAllRows();var n=d.length,o=e.currentPageSize,p=0,q=n;if(e.footer&&(e.footerleft.empty(),e.footercenter.empty(),e.footerright.empty()),(!e.element||i)&&(e.element&&e.element.remove(),e.element=l("<"+(j.nodeType||"div")+">").addClass("nx-list"),c=e.contents=l("<"+(j.contentsNodeType||"div")+">").addClass("nx-list-contents").appendTo(e.element),f.responsive&&a.responsive.registerGrid(e.id(),c.addClass("sm-grid").data({precision:f.gridPrecision||4,minwidth:f.gridMinWidth||300,layoutmode:"rigid"})),e.setUp(j)),o&&"all"!=o&&n>o){e.currentPage<0&&(e.currentPage=0);var r=Math.ceil(n/o);e.currentPage>r-1&&(e.currentPage=r-1),p=o*e.currentPage,q=o*(e.currentPage-0+1),e.currentPage==r-1&&(q=n),d=d.slice(p,q);var s=l("
").addClass("nx-buttonset"),u=l("
").addClass("first").text(t("first")).button(),v=l("
").addClass("prev").text(t("previous")).button(),w=l("
").addClass("next").text(t("next")).button(),x=l("
").addClass("last").text(t("last")).button(),y=e.currentPage2?e.currentPage+2:4;s.append(u,v);for(var A=y;z>=A;A++)if(A>=0&&r>A){var B=l("
").text(A-0+1).attr("data-pn",A).button();A===e.currentPage&&B.addClass("nx-button-selected"),s.append(B)}s.append(w,x).buttonset(),s.children().filter('[data-pn="'+e.currentPage+'"]').button("disable"),0===e.currentPage?(u.button("disable"),v.button("disable")):e.currentPage==r-1&&(x.button("disable"),w.button("disable")),this.footerright.append(s),s.on("click",".ui-button",function(){var a=l(this);a.is(".first")?e.goToPage(0):a.is(".prev")?e.prevPage():a.is(".next")?e.nextPage():e.goToPage(a.is(".last")?r-1:parseInt(a.data("pn"),10))})}if(o&&"all"!=o&&n){var C=[5,10,25,50];-1==C.indexOf(e.options.pageSize)&&C.push(e.options.pageSize),-1==C.indexOf(e.currentPageSize)&&C.push(e.currentPageSize);var D=function(a,b){return a-b};C.sort(D);for(var E=l(""),F=0;F<C.length;F++)E.append(''+C[F]+"");E.children().filter('[value="'+o+'"]').attr("selected","selected"),E.change(function(){l.cookie("nx-page-"+a.page.id+"-"+e.model.id+"-ps",l(this).val()),e.currentPageSize=parseInt(l(this).val(),10),e.render()});var G=l("");G.append(""+t("show")+" ",E," "+a.label.merge(t("objects_per_page"),e.model.labelPlural)+""),this.footerleft.append(G)}var H=t("pagination_limit_reached"),I=e.model.debug===H,J=e.model.canRetrieveMoreRows===!0;if(n){var K=n+"";J&&(K+="+"),this.footercenter.append(""+a.label.merge(t("showing_rows"),p+1,q,K)+(I?" ("+H+")":"")+"")}if(J&&!I){var L=l('').text(t("load_more"));L.on("click.skuid",function(){e.blockUI({message:t("loading")}),e.model.loadNextOffsetPage(function(){e.unblockUI()})}),this.footerleft.append(L)}n||this.footercenter.append(""+a.label.merge(t("no_objects_to_display"),e.model.labelPlural)+"").css("line-height","25px"),b.doNotCache&&(l.each(e.renderedItems,function(a,b){b&&b.destroy()}),e.renderedItems={},e.makeConditionsBar()),e.beforeRender(j),e.visibleItems=[],b.destroyDeletedRows===!0&&l.each(e.renderedItems,function(a,b){!b||a in e.model.dataMap&&!(b.row&&"__deleted"in b.row)||(b.destroy(),delete e.renderedItems[a])}),l.each(d,function(){var a=this,c=e.renderedItems[a.Id];c&&!b.doNotCache?(b.resetItemModes===!0&&c.resetMode(),b.refreshFields!==!1&&(m&&m[a.Id]?c.refreshFields(m[a.Id]):c.refreshFields())):c=e.newItem(this,b),"__notdeleted"in this&&c.element.removeClass("deleted"),"__deleted"in this?c.element.addClass("deleted"):c.element.removeClass("deleted"),g.push(c.element),e.visibleItems.push(c)}),j.noAutoAppend||(e.contents.children().detach(),e.contents.append(g)),k&&e.attach(),e.renderComplete(j)},d.prototype.showRow=function(a){var b=this,c=!0;return b.conditions&&b.conditions.length&&(c=n.doesRowMeetConditions(a,b.conditions)),c},d.prototype.handleNewRow=function(a,b){var c=this,d={};if(b&&l.extend(d,b),a.Id&&!(a.Id in c.renderedItems)&&c.showRow(a)){var e=c.newItem(a,d);if(c.contents.prepend(e.element),c.render({resetPagination:!0,refreshFields:!1}),e&&"edit"===e.mode){var f=e.element.find(".nx-field > :input:visible:not(.nx-skootable-rowselect):not(.hasDatepicker):not(select)").first();f&&f.focus()}}},d.prototype.handleRowDeletion=function(a){a&&a in this.renderedItems&&this.renderedItems[a].destroy()},d.prototype.newItem=function(a,b){if(a.Id){var c=new e(this,a,{mode:b&&b.editModeForNewItems?"edit":this.mode,selected:b&&b.selected});return c.render(),this.renderedItems[a.Id]=c,c}},d.prototype.attach=function(){this.editor.contents.append(this.element,this.footer)},d.prototype.makeViewSwitcher=function(){var b=this,c=[];l.each(b.views,function(a,d){c.push({value:a,label:d.label||a,icon:d.icon,isSelected:b.currentView===a})});var d=l("").actionSelect({items:c,onItemSelect:function(c){var d=b.currentView;b.currentView=c.value,b.render({doNotCache:!0,previousView:d}),l.cookie("nx-list-view-"+a.page.name+"-"+b.model.id,c.value)}});return d.addClass("nx-viewswitcher")},d.prototype.makeSearchBox=function(){var a=this;if("client"===a.searchMethod&&(a.customFilter=function(b,c){var d=!1;return l.each(a.searchFields,function(e,f){var g=a.model.getFieldValue(c,f.id,!0);return null!==g&&(d=-1!=g.toLowerCase().indexOf(b.toLowerCase())),!d}),!d&&a.searchSubFields&&l.each(a.searchSubFields,function(e,f){var g=c[e];g&&g.totalSize&&f.length&&l.each(g.records,function(c,e){return l.each(f,function(c,f){var g=a.model.getFieldValue(e,f.id,!0);return null!==g&&(d=-1!==g.toLowerCase().indexOf(b.toLowerCase())),!d}),!d})}),d}),a.searchFields||"custom"===a.searchMethod){var b="placeholder"in document.createElement("input"),c=l(''),d=a.searchPlaceholderText?n.mergeAsText("model",a.searchPlaceholderText,{createFields:!0,registerFields:!1},a.model):t("search")+" "+a.model.labelPlural;a.customFilterValue&&c.val(a.customFilterValue),b?c.attr("placeholder",d):(c.addClass("unchanged").val(d),c.focus(function(){c.hasClass("unchanged")&&c.val("").removeClass("unchanged")}).blur(function(){""===c.val()&&c.val(d).addClass("unchanged")}));var e=a.model.getConditionByName(a.searchConditionName);return e&&"group"===e.type&&!e.inactive&&e.value&&c.val(e.value),a.options.delayFilterExecution&&c.on("keyup",function(b){13===b.which&&a.applyFiltersAndSearch()}),n.delayInputCallback(c,function(b,d){a.options.delayFilterExecution&&"undefined"==typeof c.data("originalValue")&&c.data("originalValue",d),"client"===a.searchMethod||"custom"===a.searchMethod?(a.customFilterValue=b,a.render()):a.options.delayFilterExecution?a.showFilterActions():(a.setSearchCondition(b),"remove"!==a.options.emptySearchBehavior||b?a.updateData({message:t("searching"),failmessage:t("error_performing_requested_search"),showerror:!0}):a.model.abandonAllRows())}),c}return!1},d.prototype.setSearchCondition=function(a){var b=this;b.model.buildSearchCondition(b.searchConditionName,a,b.searchFields,{tokenize:b.options.tokenizeSearch,useSOSLSearch:b.options.useSOSLSearch,SOSLFields:b.options.SOSLFields})},d.prototype.showFilterActions=function(){this.applyFiltersBtn.show("fast"),this.cancelFiltersBtn.show("fast"),this.editor.options.showSaveCancel&&this.editor.submitbuttons.hide("fast")},d.prototype.hideFilterActions=function(){this.applyFiltersBtn.hide("fast"),this.cancelFiltersBtn.hide("fast"),this.editor.options.showSaveCancel&&this.editor.submitbuttons.show("fast")},d.prototype.applyFiltersAndSearch=function(){var a,b=this,c=b.searchBox;c&&(a=c.is(".unchanged")?"":c.val(),c.data("originalValue",a),b.setSearchCondition(a)),b.filters&&l.each(b.filters,function(){var a=this.activateFilter;a&&a()}),"remove"!==b.options.emptySearchBehavior||a?b.updateData({message:t("searching"),failmessage:t("error_performing_requested_search"),showerror:!0,successcallback:function(){b.hideFilterActions()}}):(b.model.abandonAllRows(),b.hideFilterActions())},d.prototype.cancelFiltersAndSearch=function(){var a=this,b=a.searchBox;b&&b.val(b.data("originalValue")),a.filters&&l.each(a.filters,function(){this.restoreOriginalValue()}),a.hideFilterActions()},d.prototype.updateData=function(a){var b=this;b.blockUI({message:a.message});var c=b.model.updateData();l.when(c).then(function(){b.unblockUI(),a.successcallback&&a.successcallback()},function(c){b.unblockUI({failmessage:a.failmessage+(a.showerror&&c?" "+t("error")+": "+c:"")})})},d.prototype.makeConditionsBar=function(){this.makeFiltersBar()},d.prototype.enableFiltersAndSearch=function(){var a,b=this;b.conditionsBar&&(a=b.conditionsBar.find(".nx-conditiontoken"),a.removeClass("unavailable"),a.children("select").multiselect("enable")),"server"===b.searchMethod&&b.searchBox&&b.searchBox.prop("disabled",!1)},d.prototype.disableFiltersAndSearch=function(){var a,b=this;b.conditionsBar&&(a=b.conditionsBar.find(".nx-conditiontoken"),a.addClass("unavailable"),a.children("select").multiselect("disable")),"server"===b.searchMethod&&b.searchBox&&b.searchBox.prop("disabled",!0)},d.prototype.blockUI=function(a){var b=this;a=a||{};var c={message:a.message};b.options.blockUICSS&&(c.css=b.options.blockUICSS),b.options.blockOverlayCSS&&(c.overlayCSS=b.options.blockOverlayCSS),b.editor.element.block(c)},d.prototype.unblockUI=function(a){var b=this;a=a||{};var c={};a.failmessage?(b.options.blockUICSS&&(c.css=b.options.blockUICSS),b.options.blockOverlayCSS&&(c.overlayCSS=b.options.blockOverlayCSS),c.timeout=a.timeout||4e3,c.message=a.failmessage,b.editor.element.block(c)):b.editor.element.unblock()},d.prototype.makeFiltersBar=function(){var a=this,b=a.options.listFilters;if(a.filters=[],!b)return!1;var c=a.conditionsBar;return c.empty(),l.each(b.children(),function(){var b=new g({xml:l(this),list:a});a.filters.push(b),b&&b.element&&c.append(b.element)}),c},d.prototype.nextPage=function(){this.currentPage++,this.render({refreshFields:!1})},d.prototype.prevPage=function(){this.currentPage--,this.render({refreshFields:!1})},d.prototype.goToPage=function(a){this.currentPage=a,this.render({refreshFields:!1})},e.prototype.id=function(){return this._GUID},e.prototype.render=function(){if(this.list&&this.list.views&&this.list.currentView){var a=this.list.views[this.list.currentView];this.element&&this.element.remove(),this.element=l("<"+(a.itemNodeType||"div")+">").addClass("nx-item"),this.element.data("object",this),a.render(this)}return this},e.prototype.refreshFields=function(a){var b=this;return l.each(b.fields,function(){(b.mode!==this.mode||!a||this.id in a)&&(this.mode=b.mode,this.render())}),b},e.prototype.resetMode=function(){return this.mode!==this.defaultMode&&(this.mode=this.defaultMode),this},e.prototype.toggleEdit=function(){return"readonly"!==this.mode&&(this.mode="read"==this.mode?"edit":"read",this.refreshFields()),this},e.prototype.toggleDelete=function(a){var b=this;return b.deleted?b.unMarkForDelete(a):b.markForDelete(a),b},e.prototype.handleUnmarkRowForDeletion=function(a){return!this.row||this.row!==a&&this.row.Id!=a.Id||this.unMarkForDelete(!1),this},e.prototype.handleMarkRowForDeletion=function(a){return!this.row||this.row!==a&&this.row.Id!=a.Id||this.markForDelete(!1),this},e.prototype.unMarkForDelete=function(a){return this.element.removeClass("deleted"),this.deleted=!1,a&&this.list.model.undeleteRow(this.row),this},e.prototype.markForDelete=function(a){return this.element.addClass("deleted"),this.deleted=!0,a&&this.list.model.deleteRow(this.row),this},e.prototype.registerField=function(a){this.fields.push(a)},e.prototype.unregister=function(){var a=this;return a.list&&a.list.model&&a.list.model.unregisterItem(this),a.fields&&a.fields.length&&l.each(a.fields,function(){this.destroy()}),a},e.prototype.destroy=function(){this.element&&this.element.remove(),this.unregister()},f.prototype.uid=function(){return this._GUID},f.prototype.register=function(a){return this.model&&this.model.registerField(this,a),this},f.prototype.unregister=function(){var a=this,b=a.options;a.model&&a.model.unregisterField(a,b?b.controllingFields:!1)},f.prototype.calculateReferenceText=function(){return n.calculateReferenceText({model:this.model,row:this.row,template:this.options.template,fieldMetadata:this.metadata})},f.prototype.calculateReferenceMerges=function(a){return a||(a={}),n.calculateReferenceMerges(l.extend(a,{model:this.model,row:this.row,template:this.options.template,fieldMetadata:this.metadata}))},f.prototype.getValidPicklistEntries=function(){var a,b,c=n.toArray,d=this,e=d.item,f=this.metadata.controllingField,g=function(a,b){var c=new sforce.Base64Binary(""),d=c.decode(b),e=d.charCodeAt(a>>3);return 0!==(e&128>>a%8)},h=e&&e.ValidRecordTypeIds?e.ValidRecordTypeIds:[],i=d.model.getFieldValue(d.row,"RecordTypeId",!0);if(i&&-1===l.inArray(i,h)&&h.push(i),h.length&&(a=n.getPicklistEntriesValidForRecordTypes(this.model.objectName,d.id,h)),f){var j,k,m=n.getAPIDescribeSObject(this.model.objectName);if(m&&(l.each(c(m.fields),function(){return d.id===this.name?j=this:d.metadata.controllingField===this.name&&(k=this),j&&k?!1:void 0}),j&&k)){var o,p=d.model.getFieldValue(d.row,f,!0);a&&a.length?(b={},l.each(a,function(){b[this.value]=1}),a.length=0):a=[],"boolean"===k.type?o=p?1:0:l.each(c(k.picklistValues),function(a){this.value===p&&(o=a)}),(o||0===o)&&l.each(c(j.picklistValues),function(){g(o,this.validFor)&&(!b||this.value in b)&&a.push(this)})}}return a?a:this.metadata.picklistEntries},f.prototype.addOrReplaceConditionsForLookupFiltersToModel=function(b){var c=this,d=[],e=c.options&&c.options.filters?c.options.filters:!1;return b||(b=c.model),e&&e.length&&l.each(e,function(e,f){var g,h,i=c.id+"_"+f.field+"_"+e,j=b.getConditionByName(i);if(j||(j=new a.model.Condition,j.name=i,b.addCondition(j)),j.field=f.field,j.operator=f.operator||"=",j.encloseValueInQuotes=f.encloseValueInQuotes,g=n.isMultiValueOperator(j.operator),"dependent"===f.type)h=c.model.getFieldValue(c.row,f.depfield,!0),"undefined"!=typeof h&&(g?j.values=h&&-1!=h.indexOf(";")?h.split(";"):[h]:j.value=h),j.type="fieldvalue";else if("param"===f.type)h=a.page.params[f.mergeField],"undefined"!=typeof h&&(g?j.values=h&&-1!=h.indexOf(";")?h.split(";"):[h]:j.value=h),j.type="fieldvalue";else if("modelmerge"===f.type){var k=a.model.getModel(f.mergeModel);k&&(g?(j.values=[],l.each(k.data,function(){j.values.push(k.getFieldValue(this,f.mergeField,!0))})):j.value=k.getFieldValue(k.getFirstRow(),f.mergeField,!0),j.type="fieldvalue")}else j.type=f.type,f.values?j.values=f.values:j.value=f.value,f.mergeField&&(j.mergeField=f.mergeField,j.originalValue=null);d.push(j)}),d};var y=function(a){if(a&&a.length){var b=[];return a.children().each(function(){var a=l(this),c="false"!==a.attr("enclosevalueinquotes"),d={field:a.attr("field"),type:a.attr("type"),operator:a.attr("operator"),value:a.attr("value"),depfield:a.attr("depfield"),encloseValueInQuotes:c};if("multiple"==d.type){d.values=[];var e=a.children("values");e.length&&e.first().children("value").each(function(){var a=n.getXML(this);a.length>8?(a=n.decodeXML(a.substring(7,a.length-8)),d.values.push(n.adjustValueBasedOnQuotedness(a,c))):d.values.push("")})}else"userinfo"==d.type?d.mergeField=a.attr("userinfotype"):"param"===d.type?d.mergeField=a.attr("value"):"modelmerge"===d.type&&(d.mergeField=a.attr("mergefield"),d.mergeModel=a.attr("model"));b.push(d)}),b}};g.prototype.setOriginalValue=function(a){"undefined"==typeof this.element.data("originalValue")&&this.element.data("originalValue",a)},g.prototype.restoreOriginalValue=function(){var a=this,b=a.element,c=b.data("originalValue");if(a.isMultiselect&&!a.isReferenceFilter){if(b=b.find("select"),"__reset"===c)b.val("");else if(c){var d=c.split(";");l.each(b.children("option"),function(a,b){l(b).prop("selected",l.inArray(b.value,d)>-1)})}b.data("echMultiselect")&&b.multiselect("refresh")}else"undefined"!=typeof c&&("toggle"===a.type?b.toggleClass("disabled",c):"daterange"===a.type?a.updateDisplayValue(c.start,c.end):a.isReferenceFilter?b.actionAutocomplete("resetItem",c):c&&"undefined"!=typeof c.value&&(a.element.is(".nx-actionautocomplete")?b.actionAutocomplete("resetItem",c.value):b.actionSelect("selectItem",c,{triggerHandlers:!1})))},g.prototype.isSelectedFromEffects=function(b){var c=this,d=!1;return b.each(function(){var b=l(this),e=c.affectedConditions[b.attr("condition")];if(e)if("deactivate"===b.attr("action")){if(!e.inactive)return d=!1,!1}else if("set"===b.attr("action")){var f=a.utils.mergeAsText("global",b.attr("value")||"",{createFields:!0,registerFields:!1});if(f!==e.value||e.inactive)return d=!1,!1}else if("activate"===b.attr("action")&&e.inactive)return d=!1,!1;d=!0}),d},g.prototype.resetAffectedConditions=function(){var a=this;l.each(a.affectedConditions,function(){a.model.resetCondition(this,a.affectCookies)})},g.prototype.applyFilterForItem=function(b){var c,d=this,e=[],f=b.effects,g=b.source,h=g&&g.effects,i=b.affectDefaultCondition;if(f&&f.length&&l.each(f,function(){e.push(this)}),h&&h.length&&l.each(h,function(){e.push(this)}),c=e&&e.length,c&&l.each(e,function(){var c=l(this),e=d.affectedConditions[c.attr("condition")];if(e)if("deactivate"===c.attr("action"))d.model.deactivateCondition(e,d.affectCookies);else if("set"===c.attr("action")){var f,h={};b.row&&(h.row=b.row),g&&g.model&&(h.model=g.model),c.attr("value")?f=c.attr("value"):b.value&&(f=b.value),f=a.utils.mergeAsTextInContext(f,h,{createFields:!1,registerFields:!1}),d.model.setCondition(e,f,d.affectCookies)}else"activate"===c.attr("action")&&d.model.activateCondition(e,d.affectCookies)}),i&&"undefined"!=typeof b.value&&d.filterCondition)
Translate

Forum|alt.badge.img+18
  • Author
  • Jul 9, 2024 6:22 PM UTC

EDIT: I bolded the 4 occurances of hasChanged in the above. Perhaps that actually useful to someone?

Translate

Forum|alt.badge.img+17
  • Nintex Employee
  • Jul 9, 2024 6:22 PM UTC

Matt gets the award for sending the most code…

I usually get this error when I have not defined an sObject for a model.  Maybe you started to set up a model and then stopped to do somthing else and forgot about it?  Happens to me all the time. 

Translate

Forum|alt.badge.img+20

My two cents. Don’t think it has anything to do with hasChanged. That’s skuid js and I don’t it’s their js that has a bug. Maybe, but I doubt it.

Does your page models point to any custom objects/fields. If not, I’ll take a look at the page if you want copy the page XML to here.

Translate

Forum|alt.badge.img+18
  • Author
  • Jul 9, 2024 6:22 PM UTC

Rob, all the models have sObjects.

Pat, Thanks… it’s entirely custom objects.

I’m guessing it has something to do with how the models are set up, but I haven’t been able to diagnose.

Translate

Forum|alt.badge.img+20

What’s the last change you made? Assuming this worked before that.

Translate

Forum|alt.badge.img+18
  • Author
  • Jul 9, 2024 6:22 PM UTC

I made some changes early this week to which model would get the url parameter, and reordered the models. But everything seems to be set up the way it should with the models & conditions.

Translate

Forum|alt.badge.img+20

I’d make a clone and start to remove one model at a time to see when the page starts to work again.

Translate

Forum|alt.badge.img+18
  • Author
  • Jul 9, 2024 6:22 PM UTC

Well… that was strange.

I realized that just before I noticed the error, I had added a field editor with a single field.

I removed that field editor, and voila! I worked.

I then added a field editor and the same field back again, and it still works!

So, I remain confused, but I have a working page. 🙂

Translate

Forum|alt.badge.img+20

How many lines of xml is the page?

Translate

Forum|alt.badge.img+18
  • Author
  • Jul 9, 2024 6:22 PM UTC

1592

Translate

Forum|alt.badge.img+8

Hi Matt,

We consider any javascript error that comes from our code a problem with Skuid.  Even if something is horribly wrong with your XML, Skuid Javascript should give you a nice error.  One really cool feature I found recently in Chrome Dev Tools is the “Pretty Print” button on the “Sources” tab.



In the future, if you want to get closer to where the error is happening, click that button and it will turn one line of minified nastiness into lots of lines of slightly more understandable nastiness.  I absolutely love that feature though.

Translate

Forum|alt.badge.img+20

Yup. I have no idea.

Translate

Forum|alt.badge.img+18
  • Author
  • Jul 9, 2024 6:22 PM UTC

Sweet. Thanks, Ben!

Translate

Forum|alt.badge.img+20

WOW!!! That button is awesome!!!

Translate

Forum|alt.badge.img+3

this whole thread is so helpful!  i ♥ the Skuid community!

Translate

Forum|alt.badge.img+3

I just wanted to add to the conversation that i got this same error. The cause was from deleting a model.  The table that was based on the model went away.  And when i looked in the UI to change the models saved from my Save button on the page, the removed model was no longer listed there.  However, when l looked at the XML, the deleted model was still in the XML to be updated by the save button.  So I wanted to report this mismatch between the XML and the UI!   If you have more questions or need clarification, let me know.

Translate

Forum|alt.badge.img+17
  • Nintex Employee
  • Jul 9, 2024 6:22 PM UTC

Thanks Rebecca.  Great sleuthing!  I’ll pass the issue along. 

Translate

Forum|alt.badge.img+18
  • Author
  • Jul 9, 2024 6:22 PM UTC

Just a note that I ran into the same issue as Rebecca. Removing a model in the builder does not remove it from lists of models behind pagetitle save/cancel buttons.

Translate

Forum|alt.badge.img+17
  • Nintex Employee
  • Jul 9, 2024 6:22 PM UTC

Hmm.  This does not happen for me any longer?  ARe you on the latest version of Skuid?  Check out Get the Latest Skuid Releases & Everything That Came Before

Translate

Forum|alt.badge.img+18
  • Author
  • Jul 9, 2024 6:22 PM UTC

Nope, looks like I was on the previous patch. Thanks!

Translate