Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
2

Apply Percent to form total

Explorer ,
Sep 01, 2023 Sep 01, 2023

I'm trying to apply a percentage (15%) to a fillable form.  It will be added to the total.  Can it be done with 2 fields, or do I need a script?  I know nothing about scripts!  Thank you in advance.

TOPICS
How to , JavaScript
1.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 01, 2023 Sep 01, 2023

Can you explain in more details what you try to achieve?

Why use 2 fields?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 01, 2023 Sep 01, 2023

Because there is a subtotal field, I would need a percent field to apply for the total

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 01, 2023 Sep 01, 2023

You will probably need a script.

Is 15% always added to total?

How do you calculate total now?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 01, 2023 Sep 01, 2023

15% is always applied (HST) in Nova Scotia.  I haven't done this before, so I've never calculated this type of field.   Are you able to give me a script to use for the 15%?  Thanks.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 01, 2023 Sep 01, 2023

Sure, I can help you, but you need to tell me how you calculate total (include field names).

It would be easier if you can share your file or screenshot of field names.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 01, 2023 Sep 01, 2023

CathyMcInnis_0-1693598774875.png

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 01, 2023 Sep 01, 2023

Ok, if you just want to add 15% to subtotal, go to 'Total' field 'Calculate' tab and under 'Simplified field notations' enter this: Subtotal*(1+Percent)

If you didn't format the 'Percent' field as percentage, then use this instead:

Subtotal*(1+0.15)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 01, 2023 Sep 01, 2023

Okay.  Thank you for that.  I'll try that.  I tried the Percent field, but it automatically made it x 100.  l'll let you know if there is any problem.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 01, 2023 Sep 01, 2023
LATEST

Thank you Nesa!  The script worked without the (1+) and shows just the tax amount.

Have a great long weekend.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines