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.
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK, what do you have and what does not work for you "as wanted"?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So, how have you configured this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Really simple example (basically what we have in the wiki)
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.