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

contare valore in orizzonatale

Participant ,
Sep 25, 2024 Sep 25, 2024

ciao a tutti, vorrei calcolare il valore AB(quante volte viene trovato questo valore) nei camp1- camp8-camp15-camp22-camp29-camp36-camp43, sono posti in orizzontale

grazie

TOPICS
JavaScript , PDF
107
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
Adobe Employee ,
Feb 10, 2025 Feb 10, 2025
LATEST

Hi @Felice29189474k2dv,

 

Hope you are doing. Thanks for writing in!

 

If you are looking for a solution, you can try the below steps: 

If you want the count to automatically update in a specific form field (e.g., "AB_Count"), follow these steps:

  1. Open your PDF form in Adobe Acrobat Pro.
  2. Select Prepare Form from the Tools menu.
  3. Add a new text field and name it "AB_Count".
  4. Right-click the AB_Count field → Properties → Calculate tab.
  5. Select Custom Calculation Script, then click Edit and enter the following:

    var fields = ["camp1", "camp8", "camp15", "camp22", "camp29", "camp36", "camp43"];
    var count = 0;

    for (var i = 0; i < fields.length; i++) {
        var value = this.getField(fields[i]).valueAsString;
        if (value == "AB") {
            count++;
        }
    }

    event.value = count; // Set the count as the value of the AB_Count field

  6. Click OK, then close the properties window.
  7. Now, whenever the values in the specified fields are updated, AB_Count will automatically display the total count of "AB".

Hope this helps.


-Souvik

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