Tap Forms – Organizer Database App for Mac, iPhone, and iPad › Forums › Using Tap Forms › Bug using a specific math formula
Tagged: formula
- This topic has 5 replies, 3 voices, and was last updated 7 years, 1 month ago by Brendan.
-
AuthorPosts
-
September 27, 2017 at 8:42 AM #24899
PaoloParticipantHi, after upgrading to last version for IOS 11 I noticed a bug in a specific math formula. Before upgrading all works fine. This is the scenario so you can test it on your side:
FIELD A
Type: result field
Format: value €
Formula: IF([FIELD E]>0;[FIELD F];[FIELD B])FIELD B
Type: input field
Format: value €FIELD C
Type: input field
Format: number %FIELD D
Type: result field
Format: value €
Formula: [FIELD B]*[FIELD C]FIELD E
Type: input field
Format: check mark ✓FIELD F
Type: result field
Format: value €
Formula: [FIELD B]-[FIELD D]FIELD G
Type: input field
Format: number %FIELD H
Type: result field
Format: value €
Formula: [FIELD F]*[FIELD G]FIELD I
Type: result field
Format: value €
Formula: [FIELD B]-[FIELD D]-[FIELD H]According with the schema above, this is a working example:
FIELD A: 85€
FIELD B: 100€
FIELD C: 15%
FIELD D: 15€
FIELD E: ✓
FIELD F: 85€
FIELD G: 10%
FIELD H: 8,5€
FIELD I: 76,5€In the previous versions all works fine but after upgrading it doesn’t works. In particular:
The multiplication of <b>INPUT</b> FIELD B in value format with INPUT FIELD C in percent format returns a blank FIELD D.
This not happen if you use a RESULT FIELD rather than an INPUT FIELD. So the multiplication of <b>RESULT</b> FIELD F in value format with INPUT FIELD G in percent format returns a correct result in FIELD H.With the last version this is the wrong result of the above example:
FIELD A:
FIELD B: 100€
FIELD C: 15%
FIELD D:
FIELD E: ✓
FIELD F: 10.000€
FIELD G: 10%
FIELD H:
FIELD I: 10.000€I also noticed that the formula used in FIELD A:
IF([FIELD E]>0;[FIELD F];[FIELD B])
works only using “;” instead of “,” but in previous version it was working using “,” like this:
IF([FIELD E]>0,[FIELD F],[FIELD B])Of course there are many ways and alternatives to obtain the correct result of the above example but if I modify the form formulas used until today it will affect old entries.
I hope that you can fix this issue.
Thanks for your time :-)September 27, 2017 at 10:13 AM #24907
Mike SchwartzParticipantMario,
One of the changes made in the latest version of Tap Forms requires localized number formats to be used in formulas. So if your localized number format uses a comma for the decimal separator, then numbers (constants) appearing in formulas must use commas. That necessitated using a different separator as a delimiter for functions with multiple parameters. That’s why you now need to use the
;
instead of,
in yourIF(X;Y;Z)
function.There still might be an unforeseen consequence (okay, bug) that Brendan will need to address, but in the meantime double-check all your formulas.
Hope that helps,
MikeSeptember 27, 2017 at 10:30 AM #24908
PaoloParticipantDear Mike, thanks for your explanation about the use of “;” rather than “,”.
But the main issue is regarding the math formula posted above and I really hope that Brendan can test it on his side to reproduce the issue. I use Tap Forms for my job and it is really important for me.September 27, 2017 at 10:56 AM #24909
BrendanKeymasterHi Mario,
Can you please email me your form template so I can experiment with it?
Thanks,
Brendan
September 27, 2017 at 11:43 AM #24912
PaoloParticipantSent!
Thanks
September 27, 2017 at 2:51 PM #24916
BrendanKeymasterTurns out this was a bug in Tap Forms in how it was handling percent formatted fields. I’ve fixed the bug for the next update.
-
AuthorPosts
You must be logged in to reply to this topic.