Welcome to the nuBuilder Forums!

Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.

addBrowseColumnTotal not working

Questions related to customising nuBuilder Forte with JavaScript or PHP.
Post Reply
hering
Posts: 10
Joined: Sun Apr 09, 2023 12:54 pm
Has thanked: 8 times
Been thanked: 1 time

addBrowseColumnTotal not working

Unread post 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.
nac
Posts: 135
Joined: Tue Dec 12, 2017 11:28 pm
Location: Aberdeen, UK
Has thanked: 9 times
Been thanked: 13 times

Re: addBrowseColumnTotal not working

Unread post 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
hering
Posts: 10
Joined: Sun Apr 09, 2023 12:54 pm
Has thanked: 8 times
Been thanked: 1 time

Re: addBrowseColumnTotal not working

Unread post by hering »

I appreciate Your reply and help.
Too bad it still doesn't work for me.
I completed the task as a report.
CarlosChavez
Posts: 4
Joined: Sun Jan 07, 2024 12:01 am
Been thanked: 1 time

Re: addBrowseColumnTotal not working

Unread post 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.
Post Reply