How to get sum of database column in a form?

Confluence User - 03 Mar, 2021

Hi,


I would like to sum a column in datalist and show this sum for example in something like calculation field.\

I would like to do the sum for actual user and also sum the whole column. 

I'm trying but no luck. Any help?


Thank you in advance

forms;datalists;sum;database

6


04 Mar, 2021
confluenceUser
confluenceUser

Do you mean to sum two columns in SQL - https://www.mysqltutorial.org/mysql-sum/ ? If you use Datalist JDBC Binder, you can use the SUM function to add two columns together and use CAST() to convert the string DB column value to numeric.

04 Mar, 2021
confluenceUser
confluenceUser

I would like to sum all records in one column.

I would like to use datalist that is already visible in in the datalist builder.

04 Mar, 2021
confluenceUser
confluenceUser

Do download the demo and training app Tutorial App: Datalist which have an example on how to "Display records with a sum total on the last row.". It involve the use of the UNION function in datalist SQL/JDBC.

04 Mar, 2021
confluenceUser
confluenceUser

It is still not what I need.

I need to sum the whole column in datalist not only data in a grid.

Could you clear it out? Thank you in advance.

05 Mar, 2021
confluenceUser
confluenceUser

Please try out Report Builder. In the List element, you can make use of "Footer Row" to compute summation of a column.

Please see Report Builder for more information.

05 Mar, 2021
confluenceUser
confluenceUser

Yes, but it sum only list or grid etc. I would like to sum datalist that is not visible.

Look below. Any help?

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print