Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Need an In-Field Calculator Function Similar to Excel's "=" Sum Function For Data Entry

Beachbum2015
Level 3
Level 3

I created a new expense form with a bunch of numeric fields for things such as transportation, lodging, meals, etc.  This form replaced an Excel spreadsheet.  Everything works fine, but now users miss the Excel sum (=) function to manually calculate a total for a field themselves.

For example, a user has four different charges for transportation that he needs to total up, and then needs to enter that total in the transportation numeric field of the form.  In the Excel version, the users had the ability to do an on-the-fly calculation, or sum, right in a cell, instead of using a calculator.  The user would click on the transportation cell, type the "=" sign, followed by the values to add, and press Enter.  Example:  =20+10+15+25   (and Press Enter)    This would enter the value of 70 in the Transportation cell.  It makes it simpler and quicker than having to open Calc, enter the numbers, and transfer the total.


Here's a quick video demonstrating the method in Excel:  https://www.dropbox.com/s/05d0umq89ky46do/Sum%20in%20a%20Field.mp4?dl=0

It would be really helpful if there was some sort of JavaScript to allow the same functionality in LiveCycle forms.  Has anyone attempted to accomplish this before to allow for in-field calculations by the user?  If this is possible, how would I go about doing it?

Thanks!

4 Replies
Beachbum2015
Level 3
Level 3

No replies yet.  Must be someone out there that has come across this need.

Anyone??

Beachbum2015
Level 3
Level 3

This image better explains what I would like to do....

Expenses2.jpg

jnicholas330
Level 7
Level 7

On the calculate event for the field you could do something like

eval(this.rawValue)

don't include the equal sign though.

Beachbum2015
Level 3
Level 3

It seems that will only work with text fields.  I have 98 numeric fields that I would need to change, and then I'm summing all of the expenses for each day at the bottom of each column.  Each column total is derived with this formula:  sum (Table_Exp.Row1[*].Amount1).   If I change all of the numeric fields to text fields, I would then need to find out how to convert the values back to numeric to allow for the formulas to work.