Page 1 of 1

Sum in Child View

Posted: 05 Jan 2018
by ksertkaya
Hello,

I have problem about child view. I added sum on the top. In main list shows correctly but in child does not. Sum link moves to next column. How can I resolve this?
Screenshot_80.png
Screenshot_80.png (12.2 KiB) Viewed 2735 times
Screenshot_78.png
Screenshot_78.png (6.92 KiB) Viewed 2735 times

Re: Sum in Child View

Posted: 05 Jan 2018
by Nikita Kurguzov
Dear ksertkaya,
It does move to the side for some reason, we will take a closer look at it, meanwhile, you can use the following code to fix this issue.

Just add this line to JavaScript editor and it should look fine:

Code: Select all

fd.relatedItems(0).find("table.ms-listviewtable tbody tr td").eq(0).hide();
Of course, if you have more than one Related Items control that you want to fix, do it for each one, just change the number in fd.relatedItems(HERE), but not the other one, it must be zero.

Let me know if this works for you or if it doesn't, we'll think of something else. Hope this information helps! :)

Re: Sum in Child View

Posted: 08 Jan 2018
by ksertkaya
Resolved. Thanks :)

Re: Sum in Child View

Posted: 24 Feb 2019
by Office365Guy
I have the same issue today! Applied the fix mentioned but it did not work for me??? Please help. My form has 2 Related Items so I added the following just to make sure. I did this on the Edit and Display forms.

fd.relatedItems(0).find("table.ms-listviewtable tbody tr td").eq(0).hide();
fd.relatedItems(1).find("table.ms-listviewtable tbody tr td").eq(0).hide();
Picture1.png
Picture1.png (9.74 KiB) Viewed 2458 times

Re: Sum in Child View

Posted: 28 Feb 2019
by AlexZver
Hi!

It should work unless you have a code that refreshes a page or Related Items control. In this case, you should also place this code after the refreshing code. You can try this code in the browser console to make sure that it works.