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

Custom Validation Script

New Here ,
Jul 27, 2021 Jul 27, 2021

I created a dropdown menu for [County Tax Rate]. I listed each county and added a customer Export Value according to each county. 

I then created a separate box for [% Sales Tax]. In which I want the Export Value of the selected county to populate. From this box, I went to Properties -> Validate -> Run Custom Validation Script and input the following script I found in a google search, exactly as it appears:

 

event.value = this.getField("County Tax Rate").value;

 

When I preview the form, the script doesn't work. Is there another script I should use?

TOPICS
JavaScript
3.3K
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
2 ACCEPTED SOLUTIONS
Community Expert ,
Jul 27, 2021 Jul 27, 2021

Use a validation script at the dropdown or a calculation script at the other field.

View solution in original post

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 ,
Jul 27, 2021 Jul 27, 2021

This script is a custom calculation script of the "% Sales Tax" field and is working fine, but you must check the "Commit selected value immediately" option of the dropdown field.

That sould work fine after that!

Please have a look on the attached pdf file.

Capture_d’écran_2021-07-27_à_20_53_11.pngexpand image

View solution in original post

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 ,
Jul 27, 2021 Jul 27, 2021

Use a validation script at the dropdown or a calculation script at the other field.

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 ,
Jul 27, 2021 Jul 27, 2021

This script is a custom calculation script of the "% Sales Tax" field and is working fine, but you must check the "Commit selected value immediately" option of the dropdown field.

That sould work fine after that!

Please have a look on the attached pdf file.

Capture_d’écran_2021-07-27_à_20_53_11.pngexpand image

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
New Here ,
Jul 28, 2021 Jul 28, 2021
LATEST

Thank you all for the suggestions - it was a combination of selecting "Commit Selected Value Immediately" and instead of using the "Validate" tab, I did "Custom Calculation" and it worked! 🙂

 

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