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

Don't know next steps after "Go to Line" Tab pops up - I want to count fields that contain text

New Here ,
Jun 27, 2024 Jun 27, 2024

Hi, SUPER new to java script and doing custom calculations with Acrobat.

I've got a column of 30 fields that could contain client initials, I want to count the fields that contain text so that the number of current clients pops up in a field near the top of form. I know there's been similar questions and answers, but the problem is that when I try a script, this 'Go to Line' tab pops up and I have no clue about what to fill in or if its a separate problem not related to code. 

Jois383052693fm3_0-1719525588168.png

I have been inputting the following script into the custom calculation box: 

var total= " ";
for (var i=1; i<=30; i++) {

if (this.getField("Client"+i).valueAsString !=" ") total++;

}

event.value=total;

 

Any guidance would be helpful TY

TOPICS
PDF forms
87
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 ,
Jun 27, 2024 Jun 27, 2024
LATEST

The window is too small, so you're not seeing the OK button, which you need to click for the script to be entered:

 

try67_0-1719526286256.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