Sum in realted item
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear RMIC,
You might want to also replace "." with nothing, so the JS doesn't consider it when counting:
You might want to also replace "." with nothing, so the JS doesn't consider it when counting:
Code: Select all
total += parseFloat(item['BetragHauswaehrungNetto'].replace('.','').replace(',', '.'));
Cheers
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear RMIC,
Hmm, this shouldn't happen, but if it does, you can try switching to Synchronous Refresh, it might help with this issue: If you face issues with duplicate rows for newly added items, please, find a workaround here - viewtopic.php?f=1&t=2172&p=6915
Hope this helps!
Hmm, this shouldn't happen, but if it does, you can try switching to Synchronous Refresh, it might help with this issue: If you face issues with duplicate rows for newly added items, please, find a workaround here - viewtopic.php?f=1&t=2172&p=6915
Hope this helps!
Cheers
Hello Nikita,
unfortunately, Synchronous Refresh does not work. The deleted item is still used in the calculation. How can this be fixed?
Yes, I have the problem with duplicate lines. I inserted the script from your link. However, it does not work.
My relatedItem is the "0" (fd.relatedItems (0)).
I have the Skirpt in the JavaScript Editor and on my calculation button, both can not be done. What am I doing wrong?
Many Thanks!
unfortunately, Synchronous Refresh does not work. The deleted item is still used in the calculation. How can this be fixed?
Yes, I have the problem with duplicate lines. I inserted the script from your link. However, it does not work.
Code: Select all
var rows = fd.relatedItems (0) .data ('ctx'). ListData.Row;
var dupes = {};
var singles = [];
$ .each (rows, function (i, el) {
if (! dupes [el.ID]) {
dupes [el.ID] = true;
singles.push (el);
}
});
I have the Skirpt in the JavaScript Editor and on my calculation button, both can not be done. What am I doing wrong?
Many Thanks!
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear RMIC,
This seems to be some sort of issue with SharePoint List View... The only thing I can think of, would be to add a new button, which would update Related Items, then the calculation should go smoothly. Try the following code:
Please, note that updating Related Items takes time, depending on the amount of items in the list, and the code is async, so it's impossible to run the calculation straight after update, it should finish first.
Let me know if this helps or not!
This seems to be some sort of issue with SharePoint List View... The only thing I can think of, would be to add a new button, which would update Related Items, then the calculation should go smoothly. Try the following code:
Code: Select all
fd.relatedItems(0).data('ctx').clvp.RefreshPagingEx('');
Let me know if this helps or not!
Cheers
-
- Posts: 4
- Joined: Sun Jan 27, 2019
I would also like to share that after putting on view > show formulas, some lines with the =SUM still appeared as such =SUMnumber1,number2 instead of displaying the correct answer. Pls see Line 90 of this updated file.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 19 guests