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

Javascript execution delay

New Here ,
Mar 19, 2023 Mar 19, 2023

I have columns of checkboxes with 2 textboxes below each of them. 1 textbox sums the values of the checkboxes. The following script is in the 'custom calculation script' for the 2nd textbox and based on the CB sums(BasicTotalLodge01), the text in the other textbox changes:

if (this.getField("BasicTotalLodge01").value < 6) {
event.value = " Still Working"
}
else {
event.value = "Lodge 1 Complete"
}

 

The script works as planned in the Lodge01 column. Toggling a CB changes it back and forth successfully. However, when testing Lodge02, 03, 04, etc, the text does not change until any other cb is changed.

I hope i worded all this in a way to understand.

As always, help is appreciated.

TOPICS
General troubleshooting , PDF forms
1.0K
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
1 ACCEPTED SOLUTION
Community Expert ,
Mar 19, 2023 Mar 19, 2023

Make sure field calculation order is correct.

Select 'Prepare form' tool, click on 'More' then on 'Set field calculation order' and make sure fields that should calculate first are on top.

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 ,
Mar 19, 2023 Mar 19, 2023

Make sure field calculation order is correct.

Select 'Prepare form' tool, click on 'More' then on 'Set field calculation order' and make sure fields that should calculate first are on top.

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 ,
Apr 01, 2023 Apr 01, 2023
LATEST

Thank you Nesa. This opened up a whole new unknown world to me and I am using it quite frequently to check and solve  'authoring' issues in other areas.

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