Skip to main content
Participant
July 27, 2021
Answered

Custom Validation Script

  • July 27, 2021
  • 3 replies
  • 3951 views

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?

This topic has been closed for replies.
Correct answer bebarth

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.

3 replies

Participant
July 28, 2021

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! 🙂

 

bebarth
Community Expert
bebarthCommunity ExpertCorrect answer
Community Expert
July 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.

Bernd Alheit
Community Expert
Community Expert
July 27, 2021

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