Looping/Counting items in Related Items

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

07 Jul 2017

For now, I can recommend simply removing all the code from the form, even the queries you need - just comment them out, manually add a few items to the list and run your tests once the list has no code at all. You can always send us your code later and we'll take a closer look at it.
Cheers

joss.wilde
Posts: 18
Joined: Wed May 17, 2017

07 Jul 2017

Thanks for still looking into this by the way. I have done as you suggested and commented out all the code on the form with the exception of one line under the button that triggers it:

Code: Select all

console.log('Length: ' + fd.relatedItems(0).data('ctx').ListData.Row.length);
Sadly this will still report double the size what the array should be every time an item is added. Short of deleting and recreating the relateditems control or recreating the other list I am not sure what else I can test.

Let me know if you have any other ideas or need me to send you the code across, no rush :)

Thanks again,

UPDATE: Also tried recreating the relatedItems and changing the list view it looks at, but this didn't help either.

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests