Page 1 of 1

addBrowseColumnTotal not working

Posted: Sun Aug 11, 2024 12:47 pm
by hering
Hello Guys,

I'm trying to use addBrowseColumnTotal
https://github.com/nuBuilder/nuBuilder- ... total_rows
but not working.

It seems very simple, but it doesn't want to function.
I removed everything else from "custom code".
I need sum of only 2 of 16 cols: addBrowseColumnTotal (['10','12'], totalOperations.SUM, 1, 'TOTAL');
Even if I try all the columns it doesn't work either (column 0 for title):
addBrowseColumnTotal (['1','2','3','4','5','6','7','8','9','10','11','12','13','14','15'], totalOperations.SUM, 1, 'TOTAL');


DB Version: V.4.5-2023.03.31.01
Files Version: V.4.5-2023.03.31.10

Thank You for help.

Re: addBrowseColumnTotal not working

Posted: Fri Aug 16, 2024 10:43 pm
by nac
Hello hering,

Can you check that you have placed this in the 'Browse' JS custom code?
If it is in 'Browse & Edit' then you will need something like..

Code: Select all

if(nuFormType() == 'browse') {
    addBrowseColumnTotal ([10,12], totalOperations.SUM, 1, 'TOTAL');
}
Neil

Re: addBrowseColumnTotal not working

Posted: Sun Sep 01, 2024 10:26 pm
by hering
I appreciate Your reply and help.
Too bad it still doesn't work for me.
I completed the task as a report.

Re: addBrowseColumnTotal not working

Posted: Thu Sep 12, 2024 6:32 pm
by CarlosChavez
You need to add in your Javascript Custom Code the code from the library as it isn't a part of the core Nubuilder code, then you can use it in that subform.