• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
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

Copy link to clipboard

Copied

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

Views

46

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

 

Votes

Translate

Translate

Report

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