You are viewing limited content. For full access, please sign in.

Question

Question

Help! Field with division calculation (percentage calculation) error

asked on January 24, 2023

Hi guys,

I have read-only fields in my form that shows a percentage calculation (division) based on the number they input in a particular field (photo below).  However, there is an issue is when I submit the form and shows the error "Error: '{0}' cannot be used as a numeric value. [LFF1012-InvalidNumericValue] [LFF1018-ErrorOccuredDuringFormulaCalculation]".

 

Upon investigating, the issue only happens if we leave a field as blank, meaning the form is dividing a zero to a number. I used a formula below which I found in one of the suggestions here but the error still seems to happen. 

Can you please help?

 

Thank you!

Kind Regards,

Rem

0 0

Answer

SELECTED ANSWER
replied on February 2, 2023

I simplified the process you provided and change all the fields that used in calculation to number and no error when submit form, see the attached video.

I also attached the process I used.

 

1 0

Replies

replied on January 25, 2023

Hello Rem, 

 

Are these single line fields or number fields?

 

Would you be able to export the form and attach the XML? I would be interested to take a look. 

 

Regards,

Travis

 

1 0
replied on January 30, 2023

Hi Travis,

I am using a single line field. Do you think that is the cause of the issue?

Also, can you please run me through how I can upload an XML file? I tried attaching it here but the xml file extension is not allowed to be attached here.

Regards,

Rem

0 0
replied on January 30, 2023

You will have to change the extension on the file from XML to TXT. 

 

I should then be able to change it back and use it to import the process. 

 

Regards,

Travis

0 0
replied on February 1, 2023

Hi Travis, 

I've attached the txt file as you mentioned. Hopefully we can find a fix to this. :)

0 0
replied on January 25, 2023

This doesn't solve the underlying issue, but might work for your needs.

Since you say the error is happening after submission and not while the form is being popualted, you may want to turn off the back-end validation.

On the Classic designer, click the "Form Settings" (looks like a gear) button and change "Backend validation > Validation level" to "No validation".

On the New designer, click on the background of the form so that the "Form > Basic" settings info appears in the slide-out panel.  Change "Backend Validation Level" to "No validation".

With these options, the form will still do the validation while you are populating the form and when the Submit button (or other action buttons) is clicked, but won't do the additional validation after the submission.

There's been a few times where a form submission just did not like something I was doing.  It worked on the front-end validation, and met our needs, but the back-end validation just didn't like it for some reason, and turning that off met our needs in that situation.

0 0
replied on January 30, 2023

Hi Matthew,

Thank you for your time helping out.

I tried what you've mentioned but I still seem to encounter the issue.

Regards,

Rem

0 0
replied on January 30, 2023

Your formula is replacing with blank if the V___26_mm field is blank, but not if the Number_of_Nuts field is blank.  Is the Number_of_Nuts field blank or zero in the cases you get the error?  Because that would be a divide by zero error.

0 0
replied on January 30, 2023

The Number_of_Nuts field has a formula that sums up the non-percentage fields so it is unlikely that this field will be zero.

0 0
replied on January 28, 2023

What version of Forms are you using? Can you also take a screenshot to show the Number_of_Nuts field?

0 0
replied on January 30, 2023

Hi Xiuhong,

I am currently using the Laserfiche Forms Professional Version 11.0.2201.20436.

Here's a screenshot of what you've asked.

0 0
replied on February 1, 2023

I cannot reproduce the issue using 11.0.2201.20436 with the current information provided. 

Can you open a support case and provide the download process XML and a video that can illustrate the issue? 

0 0
replied on February 1, 2023

Hi Xiuhong, can you please guide me on how to do that? 

0 0
replied on February 1, 2023

Hi Xiuhong, I've attached a txt file because it doesn't want to allow me to attach the XML file here. Also, the screen record file size is too big not allowing it to be uploaded.

0 0
replied on February 1, 2023

I can reproduce now with the process you attached. Based on initial investigation, it should related to the field type is single line, can you change your form to use number fields for those fields that require number value and will be used in math calculation? I will do more investigation tomorrow to see when there is no front end user when click submit. 

0 0
replied on February 2, 2023

Hi Xiuhong, I've tested using the number field when Travis mentioned it but still didn't get lucky with it. 

0 0
SELECTED ANSWER
replied on February 2, 2023

I simplified the process you provided and change all the fields that used in calculation to number and no error when submit form, see the attached video.

I also attached the process I used.

 

1 0
replied on February 2, 2023

I also confirmed if keep to use single line fields but change the formula to something like "=DIV(VALUE(White), VALUE(Total_Normal))" which changes the string value to a number than use math calculation, then there will be no error when submit the form. 

0 0
replied on February 3, 2023

It works! I was getting an error earlier with the number fields but after I saw your video, it was due to the =SUM(Values(White), Values(Spot)). But this time it definitely works!

Thank you so much for your help Xiuhong!  

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.