Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Confiform Sum two fields

A really simply question. I have six fields all numeric on my form. I want to create a 7th field that is the sum of all of those six that dynamically updates as and when any of those 6 fields are changed.

How do i do that in Confiforms??

1 answer

0 votes
Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Feb 13, 2023

Hi

Add a Formula type field to your form definition and set the formula expression

([entry.field1] + [entry.field2])

If they are non compulsory then do something like this

(ZEROIFEMPTY("[entry.field1]") + ZEROIFEMPTY("[entry.field2]"))

More on formulas in ConfiForms could be found here 

Alex

I have tried this already

Setting a Confiform field definition to formula, and in the expression section trying both of the methods you described. 

and nothing happens when the fields are updated on the form. The formula field just stays blank.

Sorry, slight update, when I use the ZEROIFEMPTY in does provide a total but only when the record is saved NOT as the values in the fields are updated. What I want is to have the form show the total as people enter data in the fields so that it dynamically updates as each field is updated.

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Feb 13, 2023

Oh good God no way. I don't want to have to write macros to sum to fields together so that they update dynamically on the form, that's WAAAAAYYYYYYY too much trouble. Thanks all the same.

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Feb 13, 2023

What do you mean "write macros"!? I dont quite understand...

Here is a screencast - just configure the field definition rule to set calculate the value for the field you want, adding it to changes in the fields that you want to track

http://recordit.co/4eWrc1TyEo

Alex

What you just said doesn't make sense to me. I already have set the field to formula, but it only updates when the record is saved. That's no use to me and I don't see any settings that allow me to change that. 

The screencast shows the result but is not a "how to walkthrough" of how to set the form up todo that. It talks about importing code (which I am not going to do) using the confiform source editor. 

If there's a simplier way, great, talk to me like a confiform newbie so I understand what you mean. 

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Feb 14, 2023

The page has a storage format that you can import and see what it does (and cloud version of ConfiForms has this built-in)... It is the easiest and only way to share configurations

I have also created a simple screencast for you to illustrate how the configurations looks in the editor

I appreciate you are trying to help, but asking me to import a page so I can how the example you've provided works is as good as asking me to fly a space rocket to the moon, on a friday, during rush hour, with my eyes closed or to guess the next winning lottery numbers. 

Nope, tried importing the source code onto a blank page and get an error, so as much as I would like to follow the example you gave seems its impossible. 

  • The reference to entity "field2" must end with the ';' delimiter. (400)

Shame there isnt a straight forward guide that shows you step by step how to do it.

Anyway, I've given up. Seems there are some things Confiform is good for, but simply adding to fields togethere isn't one of them. I will have to live with the "calculate on save" for now.

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Feb 16, 2023

I have recorded you a screencast - is it also hard to follow? There is literally one “set value” rule to add to your form

How more detailed this should be? I am just trying to improve and “fix” what’s broken 

Alex

I tried everything you suggested. And while it all worked on screen and calculated as number were entered and the record saved. When it was brought back up to edit all the totals were wrong. I have no idea why, as all seemed fine. I had to to change one field in the formula to correct the totals and saved again. Clearly there's more to this in terms of field types (for example I used the same as you, READONLY) that need to be explored, but the form is already in use and I can't keep changing it as then I have to go back and edit all submitted records to correct them.

Anyway, I am sticking with calculate on save, it's not perfect but at least its accurate. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events