# Sum Values Java Function

**URL:** <https://community.glideapps.com/t/sum-values-java-function/68069>\
**Category:** Ask for Help\
**Created:** [November 23, 2023, 2:21pm UTC](https://community.glideapps.com/t/sum-values-java-function/68069 "2023-11-23T14:21:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcos\_Gomes](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/marcos_gomes/32/66876_2.png) [@Marcos\_Gomes](https://community.glideapps.com/u/Marcos_Gomes)\
**Post date:** [November 23, 2023, 2:21pm UTC](https://community.glideapps.com/t/sum-values-java-function/68069/1 "2023-11-23T14:21:35Z")

</div>

Hey guys.  
In my system there is a register of routines.  
For example, the user must execute an activity every 5 days.  
The administrator registers the routine informing the initial date that the user must start performing the activity, for example: 11/20/2023.  
My system works for periods of 1 year, so let’s assume this ends on 12/31/2023.  
I created a java function to count how many routines each user will have to execute by the end of the period.  
In the case above, the user will have to register by 12/31/2023: 8.  
So far so good.  
But now I want to add up how many records all users will need to register by the end of the period.  
But the rollup function only returns Count options and not Sum.

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/3/938f744a723b8f67661a88fbf86554cfe7fee3c7.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/d/2d438efc4066a7eadee465bb08f26de099d2820f.png)

Any suggestion?

Thank you very much.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [November 23, 2023, 2:30pm UTC](https://community.glideapps.com/t/sum-values-java-function/68069/2 "2023-11-23T14:30:00Z")

</div>

Try passing the returned java value through a math column. You may or may not need to multiply by 1. Then the Rollup should work.

---

<div class="post-metadata">

**Author:** ![Marcos\_Gomes](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/marcos_gomes/32/66876_2.png) [@Marcos\_Gomes](https://community.glideapps.com/u/Marcos_Gomes)\
**Post date:** [November 23, 2023, 2:45pm UTC](https://community.glideapps.com/t/sum-values-java-function/68069/4 "2023-11-23T14:45:38Z")

</div>

Thank you so much.  
I was tried this, but I didnt multiply by 1.  
😑

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [November 30, 2023, 2:46pm UTC](https://community.glideapps.com/t/sum-values-java-function/68069/5 "2023-11-30T14:46:20Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
