Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Nintex Community
- :
- Forums
- :
- Nintex for SharePoint
- :
- Calculating the sum total of multiple text control...

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Hi,

I have a form with a few Text controls (data type: decimal) and Calculated Value controls that totals the contents of those text fields that looks like this:

NOTE: The text controls are named 1, 2, 3, 4, 5 as specified by their corresponding labels.

NOTE: The calculated values contain the calculations as specified in their corresponding labels e.g. 1+2+3+4+5 or sum(1+2+3+4+5), etc

I've used 4 calculated values for demonstration purposes where the first calculated value is what I assume to be the correct syntax and works correctly. The remaining 3 are deliberately incorrect.

Now if I delete a value from one of the fields the formula breaks:

The first two values are totaled but the null value then breaks the sequence and the subsequent values are concatenated.

At the moment I can work around this by using a zero instead of null but I would like to know if I'm doing something obviously wrong with the calculation.

Thanks!

Solved! Go to Solution.

9 Replies

Highlighted
Reply

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Hi,

if you use the following formula you can solve your issue:

**sum([1,2,3,4,5])**

it's similar to your fouth test but it has an array as argument (if you check the description of the sum function, you can see that it asks for a set of values inside brackets).

Giacomo

Highlighted
##

Jump to solution
Reply

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Re: Calculating the sum total of multiple text controls

Perfecto! Thanks Giacomo!

Highlighted
##

Jump to solution
Reply

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Re: Calculating the sum total of multiple text controls

This way to create arrays should be made more obvious in the documentation or description texts.

Highlighted
##

Jump to solution
Reply

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Re: Calculating the sum total of multiple text controls

How would I do this when the number of rows will vary? Also, is there a way I can convert the total value into hours and minutes, e.g., 123 would equal 2 hours 3 minutes.

Thank you.

Highlighted
##

Jump to solution
Reply

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Re: Calculating the sum total of multiple text controls

I haven't checked it but you could probably set "Convert empty string to null" under advanced to something like 0. Then it would calculate with that value.

To get the hours and minutes you just calculate hours and minutes seperatly.

123 / 60 => you get the hours

123%60 => modulo will get you the minutes

You can write both like this into a calculated value field and get the result imidiatly.

Highlighted
##

Jump to solution
Reply

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Re: Calculating the sum total of multiple text controls

Hi Giacomo,

I'm also facing same type of issue while adding 2 number columns in Nintex calculation value not working due to language issue. My site is in french(Sweden) due to that sum not working. Please help with work around.

Ex: In Formula

sum([projectYear,1])

Project Year (Number column) value display as "2 018" space created due to language issue.

Highlighted
##

Jump to solution
Reply

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Re: Calculating the sum total of multiple text controls

Hi,

could you change your calculated field to show the result as text instead of number?

Highlighted
##

Jump to solution
Reply

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Re: Calculating the sum total of multiple text controls

It's already used in so many places i can't change the type to text now. Is there any other workaround for this?

Highlighted
##

Jump to solution
Reply

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Re: Calculating the sum total of multiple text controls

Excellent, thank you Giacomo