Plumsail forms - rounding after app update

Hello,

we have problem with rounding numbers after upgrading to new version of Forms app (currently on 3.2.8). Sharepoint field is configured to have 2 decimal places (worked fine on old forms version) and also precision on forms app is configured to 1.00. But after entering number with decimal places, form rounds number to integer. We are using Slovak locale on Sharepoint site. Do you have any advice how to solve this issue?

Thank you,

I have the same issue. Added another field to a form, saved it and then a currency field started rounding.

Hello @bnunweiler, @corstro,

I couldn't reproduce the same behavior on my form.

Is it a Number or Currency field type? Please share the screenshot of the field settings including the SharePoint field and General sections like so:

Does number fields on all forms behaves this way? Do you have any custom code on the form that changes this field widget? Example:

fd.field('Field1').widgetOptions = {
    format: 'n2'
}

Please check the app package version used by that specific form. Go to page source >> page >> forms.plumsail.com and share the screenshot:
image

No custom code btw. Checking the package now. Should be the latest version.

Webpart/1.0.8.0
widget/1.0.8

Is there an update?

Hi Nikitina,

here is the screenshot from designer:

We tried to remove whole javascript and it behaves still same on all number fields.

We are using same version of ap package as bnunweiler:

Updating app package from the Sharepoint store (link) to the latest version solved that issue. But firstly I had to remove old version from the app catalog manually.

1 Like

@bnunweiler,

Please update the app package to the latest version.

For this, delete an existing app package from the App Catalog and install the latest one from the Microsoft AppSource.

Then, re-save the form, clear the browser cache and test if the issue is resolved.

Updated and Fixed. Thank you.

1 Like

I am having the issue with a currency field.
No custom format in JS.
image
App package version I am getting this:
image

It is also storing the numbers rounded.

Hello @cwalter2,

Please share the screenshot of the SharePoint field settings like so:

And please record a short video demonstrating the field behavior. I will try to reproduce that on my form.

Here is the field settings:


I pass the rate from the parent form, in the video shown it is $72.96. I verify the numbers are coming in correctly in console:
image

So for (1) ST Hour, I should get $72.96. It is rounding to $73 and storing the numbers this way.

It is important to note, this form used to work properly. I wanted to make a change to the new form and that is when the issue presented itself. If I used the edit form on older items, the numbers are stored and calculating correctly.

@cwalter2,

How do you pass the value from parent to child? Please share the code.

Please also export child form and share it with me. I will check the field settings and test it on my side.

I pass the numbers using a custom new button from the parent form:

var newCatBtn = {
            text: 'Add Category',
            class: 'btn-primary',
            visible: false,
            icon: 'Add',
            iconType: 0,
            click: function() {
                var url = 'https://mysite.sharepoint.com/sites/pwa/SitePages/PlumsailForms/Project%20Categories/Item/NewForm.aspx?FormID=fc1058b5-a908-46a0-8b2b-822930f5f6f0';
                Dialog.open(url, {
                    passedId: fd.itemId,
                    passedSingleLineText7: PhaseOrigNumber,
                    passedSingleLineText9: PhaseCopy,
                    passedSingleLineText8: PhaseNumber,
                    passedSingleLineText6: PhaseId,
                    passedNumber10: fd.field('CompSTCost').value,
                    passedNumber11: fd.field('CompOTCost').value,
                    passedNumber12: fd.field('CompDTCost').value
                }, function(hasSaved, returnedArgs) {
                    if (hasSaved) {
                        fd.control('CategoryList').refresh();
                        calcBudget();
                    } else {
                        console.log("Form Didn't Save")
                    }
                }, {width: Number(window.innerWidth) * .75, height: Number(window.innerHeight) * .85, title: fd.field('Project_x0020_Number').value + ' - ' + fd.field('Title').value + ' | New Category for ' + PhaseNumber + ' - ' + PhaseCopy});
            }
         };

The fields CompSTCost, etc. is a common field that is populating on render via a lookup. These numbers do come in correctly and are passed as numbers.

Here is the form:
Item (New) Project Categories.customization (20.9 KB)

@cwalter2,

Thank you! What version of the desktop designer are you using? Please share the screenshot.

What is your site's locale?

If you open this New form from the SharePoint list view, not from the parent form, and set field value with the code from the browser console, do you see the same behavior?

fd.field('STRate').value = 75.84

Desktop Designer:


Locale:
image

I do see the same behavior if opening from list view.

@cwalter2,

I couldn't reproduce the issue. The field value has two decimals:
image

Please share the version number of the designer. For this click on the designer icon at the top left of the screen >> About:

If your version is not 3.3.0, please update the designer and re-save the form.

I deleted the fields from the form and put them back in I get the decimals now however I only get (2) if there is a number in the hundredths location. I.e., $95.50 appears as $95.5. I also am not getting the dollar sign.

Here is the designer:
image

@cwalter2,

This is as designed. You can change the currency field formatting with the code:

fd.field('Currency').widgetOptions = {
    format: 'c2'
}

image

Perfect. I made that change and all is working.

1 Like