add calculated value in datalist

Confluence User - 22 May, 2016

Hi,

I'm a newbie.

Can anyone help me find a way to include a total value for a column in a datalist?

Thanks!

forms;datalists;userviews

1


23 May, 2016
confluenceUser
confluenceUser

Hi Daniel

One option is to use your own SQL in Datalist>Source>Select Binder>Configure JDBC Datalist Binder.

Example using MySQL below:

 

SELECT id, firstName, lastName, email FROM dir_user
UNION
SELECT "","","", CONCAT("Total Users = ",COUNT(*)) FROM dir_user

The last line of the datalist will show the total in the last column. You can replace COUNT() with SUM() or AVG() etc.


RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print