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

ConfiForm display of calculated field in form

Dirk Spitzkowski August 21, 2024

 

 

 

 

 

Hello everyone,

I have a problem with the display of a calculated field in a ConfiForm form. Have the following task:

- In the form, the monthly statement of expenses is to be summarised and submitted by e-mail.

- The form has a table-like structure and the table consists of the columns item number, description and amount in euros - You can enter 20 items in the form.

- The form is then sent to a specific e-mail address.

No problem so far - but I would like to display a totalisation of the amounts per item in the form. Therefore I use the ‘Formula’ field type.

It works fine in the e-mail. I get a total calculated here - but how do I get the totalisation to be calculated synchronously with the data input by the user and displayed directly in the form after an amount has been entered?

Would be great if someone here has an idea.

Regards - d.

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
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.
August 21, 2024

Hi @Dirk Spitzkowski 

Are you looking to calculate formulas online, right when the user fills in the form? Is that what you want? In this case you need to probably switch to "Set expression" rule and have you formula there

Alex

Dirk Spitzkowski August 21, 2024

Hi Alex -

thanks for your quick reply. Yes, I want a calculated field when the user fills in the form.

I have now tried this with a ‘Rules for Field Definition’. But I may be making a mistake here, because the field is not calculated as wanted when the form is filled out.

I have set the parameter ‘Set expression’ to ‘Action to execute’. And set the following formula in ‘Value to set’ the formula': ‘(zeroifempty(’[entry.Position1Amount]‘)+zeroifempty(’[entry.Position2Amount]‘)’.

But unfortunately this does not work. Do you have any idea whether I'm missing something?

Thanks in advance - d.

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.
August 21, 2024

functions are case sensitive, there is now such thing as zeroifempty

Besides... the arguments should be in double quotes and in the documentation

ZEROIFEMPTY("[entry.Position1Amount]") + ZEROIFEMPTY("[entry.Position2Amount]")

Alex

Dirk Spitzkowski August 21, 2024

Thanks for this -  changed the function name to case sensitiv and put the arguments in double qoutes but it's still does not work as wanted.

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.
August 21, 2024

OK, what do you have and what does not work for you "as wanted"?

Dirk Spitzkowski August 21, 2024

Hi Alex - 

the calculation of the field that should sum up the Position1Amount and the Position2Amount does still not work, when the user fills in the form.

Regards, d.

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.
August 21, 2024

So, how have you configured this?

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.
August 22, 2024

Really simple example (basically what we have in the wiki)

calculate3.pngcalculate2.pngcalculate1.png

Alex

Like Dirk Spitzkowski likes this
Dirk Spitzkowski August 22, 2024

Hi Alex,

Thank you very much for your help and patience - the example of configuring a simple addition of the two fields has now worked.

Great - thanks for that, d.

TAGS
AUG Leaders

Atlassian Community Events