Counting/Looping Related Items

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
slashmaster
Posts: 29
Joined: Fri May 25, 2018

24 Jul 2018

Hi,

there are some Threads similar to my question. I got an Related-Item Control which Displays 10-15 Entrys.
Normaly this code should tell me, how much exactly:

Code: Select all

 fd.relatedItems(0).data('ctx').ListData.Row.length 
But i got an Error (IE - F12) >>The object does not support the property or method "relatedItems"<<
(see Attachment)
Unbenannt.JPG
Unbenannt.JPG (19.15 KiB) Viewed 2017 times
Any ideas? Thanks in advanced.

Best regards

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

24 Jul 2018

Dear slashmaster,
This is indeed rather strange, as this piece of code should definitely not give this error. Can you tell us which version of SharePoint and which version of Forms Designer you are using?

It would also help if you could publish all the JavaScript that you use, so we can test it working together, maybe the error appears earlier in the code, but gives a warning only here.
Cheers

slashmaster
Posts: 29
Joined: Fri May 25, 2018

24 Jul 2018

Hey,

SharePoint 2013, IE11

display.JPG
display.JPG (83.63 KiB) Viewed 2012 times
Unbenannt.JPG
Unbenannt.JPG (19.8 KiB) Viewed 2012 times
I created a blank form, no other JS.

Greetz

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

24 Jul 2018

Dear slashmaster,
What about Forms Designer, which version are you on?
VersionNumber.png
VersionNumber.png (2.97 KiB) Viewed 2009 times
Cheers

slashmaster
Posts: 29
Joined: Fri May 25, 2018

24 Jul 2018

Hi,

3.0.7

:-O

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

24 Jul 2018

Dear slashmaster,
Hmm, this could be it, but you are saying that the code normally works, right? It's just not working for this particular form, if I understand correctly. That's what makes it weird.

In any case, I do recommend an upgrade, but I do not promise that it will resolve the issue, as we are currently unaware of what causes it. If you don't have an active Maintenance License (lasts 1 year after purchase of the main license), you'll need to purchase it first, and then upgrade. It can be found in our store here - https://spform.com/buy/support-maintenance
Cheers

slashmaster
Posts: 29
Joined: Fri May 25, 2018

26 Jul 2018

Good morning,

thank u for ur answer. Yes, code normally works fine. In this case not. I'll check the Update/License (well, the Admin will do :-) ).

Best regards

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

26 Jul 2018

Dear slashmaster,
Something must be different about this form then, that makes the code not fire. Are you trying only the Display Form? Try the Edit Form as well, if this is the case. If you have Related Documents, try to switch Source List to a List instead of a document library. Try the code with the default content type.

Finally, it might be the site itself that you are using? Are you on SharePoint Online or SharePoint On-Premises. If Online - make sure Forms Designer app is installed in Site Contents from the store. If On-Premises go to Site Collection -> Site Settings, choose Site collection features in Site Collection Administration section, de-activate and re-activate Forms Designer feature.
Cheers

slashmaster
Posts: 29
Joined: Fri May 25, 2018

27 Jul 2018

Hello,

i'm dont use Default Content types. I will create another new List and Try it. To switch the Library-Source doesnt work. I'll speek to SharePoint-Admin to check ur other suggestions.

Thank u!

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 24 guests