Select to view content in your preferred language

1+1+1+1+1=401?

1082
7
Jump to solution
11-13-2019 09:08 AM
BRYANHERRON
Regular Contributor

OK, I have a survey123 form that exports to a paper form that among other things is set up to capture hours worked on specific tasks for up to 4 employees on a specific job. On the left, Employee1 totals correctly, Employee2, 3 & 4 does not. These were all working correctly until I rearranged the form. I inserted rows and copy/pasted entire rows to put the questions in better order than they originally were. Why is editing these forms such a pain?

First off the leading zeros are the default that is set. Overwriting them or leaving them makes no difference in the calculations.

In the second pic you can see that the top 4 input boxes are multiplied by 10 and added together, or Survey123 is appending a 0 to the end. Regardless, 1+1+1+1=40. In the last 2 pics you can see that the time entered in the Soil testing box is not added, but is appended to the end of the integer in the total box, 1+1+1+1+1=401 and 1+1+1+1+2=402

Possibly the dumbest thing I've ever seen.

Why did/does this happen?

Can it be fixed?

How do i fix it?

Retype everything from scratch without copy/paste? Surely that's not what is expected.

0 Kudos
1 Solution

Accepted Solutions
DougBrowning
MVP Esteemed Contributor

No use the bind:type field (not the Esri one).

On the copy/paste you need to right click and use Paste values.  Otherwise Excel brings ALL the formulas and such.  Easy way to mess up your form.  This is an excel issue not a 123 thing.

View solution in original post

7 Replies
DougBrowning
MVP Esteemed Contributor

Common issue.  Everything defaults to string.  In the bind type column set it to int on all the fields.  Then the _+ will add instead of concatenate.

0 Kudos
BRYANHERRON
Regular Contributor

Do you mean set the bind:esri:fieldType column to esriFieldTypeInteger?

I did that and there was no change. I was certianly hoping that was going to be the fix; it sounded like it was going to be.

I rebuilt a new form typing in everything in the type & name column from scratch and copy/pasting the rest of the form. No change. Actually after I typed in the 14 name fields for Employee1, I copied them to Employee2-4 and changed the number accordingly. Evidently you can't do that either. It seems that if you window everything in columns C thru AE in one form and paste that into a new form, that none of the pulldowns will work in C thru AE in the new form.

WHAT CAN YOU COPY/PASTE?

0 Kudos
DougBrowning
MVP Esteemed Contributor

No use the bind:type field (not the Esri one).

On the copy/paste you need to right click and use Paste values.  Otherwise Excel brings ALL the formulas and such.  Easy way to mess up your form.  This is an excel issue not a 123 thing.

BRYANHERRON
Regular Contributor

Got it. Order is restored to the universe... until I break it again.

Thank you.

0 Kudos
BRYANHERRON
Regular Contributor

Hehe, I get this every now and then. With no more than 2 decimals input.

Gremlins!!

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Bryan,

This is a common symptom of floating-point math - you'll want to round the number to the level of precision needed.

BRYANHERRON
Regular Contributor

Thank you sir, although I don't understand how it incorrectly adds numbers. I guess it's just a glitch, and an odd one at that. hehe

and thank you for your patience with those of us that are still figuring it all out.

0 Kudos