Skip to main content
Participating Frequently
March 19, 2023
Answered

Javascript execution delay

  • March 19, 2023
  • 1 reply
  • 1229 views

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.

This topic has been closed for replies.
Correct answer Nesa Nurani

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.

1 reply

Nesa Nurani
Community Expert
Nesa NuraniCommunity ExpertCorrect answer
Community Expert
March 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.

Participating Frequently
April 1, 2023

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.