cancel
Showing results for 
Search instead for 
Did you mean: 
lramos
Nintex Newbie

Repeater Section throw error - Unable to get property..of undefined or null reference

Jump to solution

Hello,

I'm facing a problem on my form. I'm getting an error with when I remove a row on my repeater section (RS).

I have a RS containing 3 fields :

  • 2 inputs named - input1, input2,
  • 1 calculated field named - calTotalRow

calTotalRow returns the product of input1 * input2.

Outside the rs I've got another calculated field (calSumRows) which return the sum of all row

At this level everything works.

Problem comes when I add a new row. The new row get over the border of RS and calSumRows not updating (see 1st picture).

row overbording

But if I remove a row then all return to "normal" (see 2nd picture). At the same time I get an error message telling me "Unable to get property "call" of undefined or null reference.

back to normal

Any idea

This problem remind me a similar case of Emily Spradlin. But the case seems to not be resolved.

Thanks!

Tech info :

Nintex Forms for SharePoint 2016

version: 4.3.0.11

Labels: (2)
0 Kudos
Reply
5 Replies
Automation Master
Automation Master

Re: Repeater Section throw error - Unable to get property..of undefined or null reference

Jump to solution

Short Answer: If you have a Default Value on the Control in addition to Min / Max Value Validation set via the Control's Settings, you're going to run into trouble. 

Removing the Default Value should fix things. 

If that is not the case, please show us the setup of your Controls, or just export and attach the form here to the forum so that we can take a look at it. 

However, if this does solve the problem, and either you or someone else wants the Long Answer as to why this is happening, I'll gladly type it up... just know that it's going to be long and silly. 

 

0 Kudos
Reply
Highlighted
lramos
Nintex Newbie

Re: Repeater Section throw error - Unable to get property..of undefined or null reference

Jump to solution

Thank you for the reply.

Unfortunately, I'm not using the Default Value in this case. As you can see, I just give a name and select "Decimal" as Data Type.

On the calculated field side, I just give a name and some basic function :

calTotalRow  = input1 * input2

calSumRows = sum(calTotalRow)

Here is an extra.

I realize when I'm clik on  "add new row" I can see an error on my Browser Console tab

I'm missing something a guess.

Here the code (3145) wich is concerned

 

0 Kudos
Reply
Automation Master
Automation Master

Re: Repeater Section throw error - Unable to get property..of undefined or null reference

Jump to solution

Ah, well I see. 

Then you're running into one of the other strange problems with Classic Forms... 

Sometimes the NF.BaseDataAccessHelper just refuses to load and there doesn't seem to be a rhyme or reason as to why it happens... 

However, there is a fix that I made and have been using internally: 

NWF.FormFiller.Events.RegisterBeforeReady(function () {
  "use strict";

  if (NF.BaseDataAccessHelper === undefined) {
    try {
      console.log("Attempting to load missing js file: 'NF.BaseDataAccessHelper.js'");
      NWF$.getScript(_spPageContextInfo.siteAbsoluteUrl.replace(/sites.+/, "") + _spPageContextInfo.layoutsUrl + "/NintexForms/JavaScriptStringHandler.ashx?" + "resourceType=jsfile&" + "fileName=NF.BaseDataAccessHelper.js&" + "culture=" + _spPageContextInfo.currentCultureName);
    } catch (e) {
      console.log("There was a problem grabbing the BaseDataAccessHelper using the JavaScriptStringHandler!");
      console.log(e);
    }
  }
});

That should do it for you. But if you're having problems, I recommend just opening the console and playing with the jQuery.getScript() function directly. The string fed into it should resolve to something along the lines of: 

"http://webApplicationURL/_layouts/15/NintexForms/JavaScriptStringHandler.ashx?resourceType=jsfile&fileName=NF.BaseDataAccessHelper.js&culture=en-US"

So if that combo of "_spPageContextInfo" stuffs isn't generating a string like that, then just try manually inputting it and then rewriting it for your own environment (being that I do not know how your environment is setup!).

I hope that this solves your problem!

Reply
lramos
Nintex Newbie

Re: Repeater Section throw error - Unable to get property..of undefined or null reference

Jump to solution

Great! the fix is working. thank you N M.

I was forced, however, to adapt the script. I'm wondering why the shared code don't work such as ?
See below my modification. I was unable to use the trigger NWF.FormFiller.Events.RegisterBeforeReady and with the jQuery.getScript() function "_spPageContextInfo" doesn't generate the string. So I input it manually.

NWF$(document).ready(function(){
     NWF.FormFiller.Events.RegisterAfterReady(function () {
"use strict";
    if (NF.BaseDataAccessHelper === undefined) {
    try {
      console.log("Attempting to load missing js file: 'NF.BaseDataAccessHelper.js'");
      NWF$.getScript("https://myWebApplicationURL/_layouts/15/NintexForms/JavaScriptStringHandler.ashx?resourceType=jsfile...");
    } catch (e) {
      console.log("There was a problem grabbing the BaseDataAccessHelper using the JavaScriptStringHandler!");
      console.log(e);
    }
  }

});
});


 

One more time, thank you

Lino

Reply
Automation Master
Automation Master

Re: Repeater Section throw error - Unable to get property..of undefined or null reference

Jump to solution

I am incredibly happy that it works, and am also perplexed as to why the _spPageContextInfo isn't working in your environment, being that it should be a native part of SharePoint (as far as I know: _spPageContextInfo in SharePoint 2016). 

In fact, if you were to open up your chrome dev console and type it in, it should be available to you on every page (including forms)! If it isn't... maybe that's indicative of something? I dunno! But it might be a fun thing to explore! 


Reply