Count the boxes with unique names 500 +.

The form, I use a simple list, which has been generated in Word and converted to a form in Acrobat, it's why he has so many unique domain names.

I found the following solution but I'm looking for something more elegant, and requires no me enter each unique name.

At the document level feature, I added the following script:

function CountCheckBoxes(aFieldNames) {
// count field names that have been selected
var count = 0;
var cField = "";
// loop through array of field names
for(i = 0; i < aFieldNames.length; i++) {
// for field names with a value of not Off increment counter
if(this.getField(aFieldNames[i]).value != "Off") count++;
} // end loop of field names
// return count
return count;
} // end CountCheckBoxes

I also added text field with the following custom calculation script:

// var define field names to be tested
var aFields = new Array('uniquename', 'anothername...etc');
// count field names that have been selected
event.value = CountCheckBoxes(aFields);

To quickly add 500 + field names, I use a temporary field to enter any field using Pick value under calculate sum. I then cut and paste into Notepad and replace it

, 

with

', '

"then a copy of the full text in the above code replacing"uniquename", ' anothername... etc"

It works but it is long, and I'm hoping a code guru might have a smarter solution.

This is the first case, not the last...

Anyway, you can use this code, then:

var totalCheckboxes = 0;

var totalChecked = 0;

for (var i = 0; i)

var f = this.getField (this.getNthFieldName (i));

If (f == null) continue;

If {(f.type=="checkbox)"}

totalCheckboxes ++;

If {(f.value!="Off)"}

totalChecked ++;

}

}

}

In the end totalCheckBoxes will contain the total number of check boxes in the file and totalChecked the number boxes enabled out of them.

Tags: Acrobat

Similar Questions

  • Count the boxes, color Format according to value

    Searched for how to count the boxes in a PDF form. Found this link and have renamed my boxes so that they share the same initial letters.  Added the script below in the section of a body of numbers custom calculation script.  Nothing happens not even.  What should I know to set up correctly?  Also, I need to add a table more so it adds another section to the meter.  These boxes begin with cbxSAP.  Once the number of box is working, is there a way to tell if the sum is = or greater than 14 to the green color of the border/field and the default value would be red?  Hope that makes sense, thank you.

    // Custom calculate script
    
    (function () {
    
    
    
        // Get an array of the PO checkbox fields
    
        var fa = getField("cbxPO").getArray();
    
    
    
        // Initialize counter
    
        var sum = 0;
    
    
    
        // Loop through the fields and update counter
    
        for (var i = 0; i < fa.length; i += 1) {
    
            sum += fa[i].value !== "Off" ? 1 : 0;
    
        }
    
    
    
        // Set this field's value to the sum
    
        event.value = sum;
    
    
    
    })();
    

    You have get an error and it's why the JavaScript console opens and displays the lines of information.

    The first line indicates there is an eorror.

    The code is a custom calculation script.

    The code cannot locate the Group of fields named "cbxPO". Verify that the field whose name "cbxPO. ' # ' exist. The ' # ' is the name or number of subfield.

    The code actually works if there are no errors.

    For hierarchical fields, there must be "." separates levels. You field names must be:

    cbxPO.Dest

    cbxPO.Tax

    cbxPO.Pay

    cbxPO.Status

    cbxPO.Freight

    And it is not important what was once the value of exports.

  • Apple TV (Gen 4) remote will not work. I can restart the box with the remote, but can not select a country with her. Can someone help me?

    I tried to reload the remote upwards. But as I said, it won't work, but I can restart the box with him. Everyone knows about similar problems - can somebody help me please!

    Welcome to the Apple community.

    A very small number of people have had a similar problem, you have an Apple remotely from another device.

  • I bought Photoshop CC 2015 creative thinking Cloud before running the trial version of my computer. After you have installed the creative cloud, the box with the number of days remaining still apears. How can I proceed?

    I bought Photoshop CC 2015 creative thinking Cloud before running the trial version of my computer. After you have installed the creative cloud, the box with the number of days remaining still apears. How can I proceed?

    Check your account indicates the subscriptions that you expect (and that the adobe, used in the next step id is correct) by logging in here and checking the status of your subscription, https://www.adobe.com/account.html

    then, if it's current, disconnect and then back to your client application using the adobe with the link above in cc id: http://helpx.adobe.com/creative-cloud/kb/sign-in-out-creative-cloud-desktop-app.html

    If this fails, CC help | Applications creative Cloud back to update evaluation Mode to 2015 CC

  • Hi I need to move my cs5 to a different cpu and do not have the box with the product key

    Hi I need to move my cs5 to a different cpu and do not have the box with the product key

    Quickly find your serial number

    Mylenium

  • Engineering problems the surrogate with Unique key primary key

    SDDM 3.3.0.747 with 2 problems (at least so far).  I hope that the problem comes from this recruit SDDM and I forgot a setting. PROBLEM 1 I don't want to start a religious debate on substitution vs natural keys but I'm having a problem correctly both the logic model of engineering.  I'm a rookie when it comes to SDDM but have many years of experience with the Designer. By default, only I wish I had a natural UID (UK) and a surrogate mother based on a primary key UID (PK) which is used for foreign keys.  The problem I have with engineering is I can successfully engineer the substitute PK, engineer of the FK with the PK, but cannot get the unique key to contain surrogate keys in the child table.  If I check the identification property in relationships, the PK columns and the UK are included in the child PK and the United Kingdom contains no columns. The installation program, I've defined two reference entities, PROBABILITY and GRAVITY with unique keys natural defined.  I also have a child entity RISK_ASSESMENT with links to entities of the PROBABILITY and SEVERITY and both have the "use surrogate keys:": check box selected.  The unique key of the entity RISK_ASSESMENT includes links to PROBILITY and GRAVITY.  None of the entities have a PK or replacement of the defined keys and they all have the checkbox "Create a surrogate key" checked.  In addition the following preferences are defined: Data Modeling/model/logic NO checked - use and the first Unique key as primary key value NOT checked - name - Keep under the name of the from attribute Checked - entity carrier to create controlled key - use surrogate PROBLEM 2 key relationship when the foreign key columns are engineered I want names have a prefix 'FK_"but they don't.  Models are defined as follows: Data Modeler/assignment of Standard/Templates Foreign Key name: FK_ {children} {parent} foreign key column: engineer FK_ {Ref column} relational model/General checked Options - translation name Marcus Bacon apply

    Once more, I designed without removing anything and still no FK to the United Kingdom of the child.

    There is a synchronization problem in DM 4.0 EA1. This will be fixed for the production version.

    Philippe

  • Tecra R940 - 1 hr: what happens to work out of the box with Linux?

    I'm considering buying a laptop Tecra R940 - 1 hr.
    I'm going to use it with linux (ubuntu) system.

    What happens to work out of the box?
    Should I expect any problems with the display/network/wifi/sound?
    What about camera, usb 3.0 and bt?

    What is possible to work? Suspend? Function keys? Fingerprint reader? SD reader?

    What's not to work?

    I run Ubuntu Studio (12.04) on a Tecra A11-ST3504, and everything works perfectly.

    However, your computer probably has the latest UEFI instead of the BIOS, and this causes problems for some with start-up and installation.

    If the live system starts and runs, I'd go for it.

    I'll put the admins the trouble to make their usual warning: "of course, Linux is not supported by Toshiba."

    Enjoy!

  • How to count the pulses with digital input on 6351

    Hi all experts in Labview,.

    I just got my USB x series 6351 and it works fine, but I certainly lack of labview skills to use it to its full potential.

    I would like to read digital pulses with several digital inputs and count the number of pulses each T interval in time. All impulses that I entered on any edge of the clock are not synchronized and can occur at random times during the tests. Basically I have an oscillator of square waves can I modulate the frequency. I don't want to use the meter as inputs as I'm limited to only 2 entries (if I use the option 2 input meter for metering of pulses or frequency). The input frequency can range from 0-1 kHz and goes 0 - 3V. So not too fast, and I shouldn't make too many mistakes trying to get the count of pulses and then back out the frequency in accordance with article ni.com on counters.

    I would like to read the 8 digital input channels and get the number of impulses for each channel. I searched high and low for help online but can't find examples that have been useful. Anyone have any ideas on how to go or direct me to a resource? Thank you very much in advance!

    Are you worried about getting the number as a physical operation timed?  It would be nice to acquire a digital waveform and then postprocess on it to detect how many events took place?  I've attached an example that shows how you can accomplish this. It reads a digital waveform and then uses a detection of crete VI to determine how many pulses occurred. Should be a few adjustments to your particular signal.  The VI I use seems to count events twice (probably count each edge), so counting it gives should be reduced by half in order to work.

  • How to download Lightroom 6, version of the box with the serial number?

    Hi, I bought Lightroom 6 in a box with a serial number. I realized at the end that I Don t have any player put the drive... so what do I do now?

    I ve tried all links available on the Adobe´s Web site, but the only available suggestions are the "program" that I m not interested.

    I use iMac, latest version. Do I have to return my purchased copy or what?

    Helena

    Download it from to install Photoshop Lightroom

    Install, then enter the serial number that came with your package.

    Keep your box. Keep your serial number safe and very convenient in case of reinstall futures.

  • Referencing of the boxes with chains of their identity papers

    I do not know it is really easy a (im a newbie)...

    I'm creating boxes to check then for execution and assignment of the ID in the format 'checkBox_1', 'checkBox_2' etc..

    I am also pushing these strings in a table, so I have a list of all the boxes, I did (through several containers of NavigationContent)

    I need loop in the table and convert the string to a valid box reference and enter the label of this check box.

    What I am struggling with, is an error in the following

    var myCheckBox:CheckBox;

    myCheckBox = CheckBox ("checkBox_1");

    trace (MyCheckBox.Label);

    and myCheckBox = "checkBox_1" as checkbox; does not work

    Miss me something of really basic here

    Unless you want to store the IDS in a table for a specific reason (in which case the above tips are valid - push of the object checkbox to the table instead of just the ID) you can browse just all the boxes on the Web by doing something like that: -.

    for each (var myCheckBox:CheckBox of in yourContainer.getChildren ())

    {

    trace (MyCheckBox.Label.ToString ());

    }

    Hope that helps,

    Alex.

  • Cannot open the word with long name file

    Hello

    I have two word file and when I want open, I have "The too long file name" and I can't open and edit.

    What do I do?

    Thank you

    Find the file on your system, not in Word.  Right-click, choose Rename.

  • Change the background color of a region, I can only change the box with text

    Hello. First of all, sorry for my English.

    I created a new model of the region in my application and I want to change the entire background to silver color.
    After reading the forum, I tried this:

    body = background-color: Silver;

    in "attributes in Table form.

    It works, but only the area with text are silver. I want the entire region with a background silver, (like a scratch on the screen, with black labels).

    My region are copied from the region of breadcrump and there the next CEB code:

    < div class = 'wire of Ariane-region' id = "' #REGION_STATIC_ID # ' #REGION_ATTRIBUTES # > #BODY # < / div >"

    I also tried putting < body bgcolor = "gray" > in several places, but never with the same results.

    Another question. I created a theme in my themes of the workspace to play with it, but... where are the files of ccs? they are not in "/ i/themes"... .and as part of the apex I don't see a way to change the footer, and an other things I want to do.

    Published by: Andres Vilallave on February 15, 2012 16:14

    Andres Vilallave wrote:
    Yes!, it works...
    Well, I think I have more visual changes now... (God thank you...)

    Good.

    But I want to learn more about the themes...
    I would like to change the theme 4, "Topaz".
    As you say, I created a copy of the file ' i/themes/theme_4"as"i/themes/my_theme_4 ".

    I have said "+ are not... create new files there as these can be changed by future updates APEX. Create your own theme folder. + ", i.e. to use a different physical location, which is referenced by another virtual folder (depending on the architecture of the Web server used).

    Then I created a new theme based on theme4 in my workspace as "my"Topaz". "" My Topaz"" theme is now available in the repository of the theme in "custom themes.
    Now I can change the templates, etc., but the css files what, image files, etc., are My_Topaz to help? Are ¿where?.
    Guess as you say I need to link "" My Topaz"" theme in the my_theme_4 folder, by assigning files in the models of the apex, how can I I do this?

    The definition of header for each page template in the theme contains elements of binding that reference the URL of the CSS as style sheets:

      
      
      
      
    

    These must be changed to refer to the new URL CSS files:

      
    

    Notice that the page templates use conditional comments to provide additional style sheets with CSS hacks and fixes for broken Microsoft browsers.

    Some other models can also reference image etc. of localities in theme files (although this is less common in the APEX 4.0 + themes).

  • XFA form with button to save the file with unique file name

    Is it possible to save a file with a unique file name by using the data that a user has entered (name, e.g.) that fires when the user clicks a button print? Attached is a file reference.

    Hello

    Yes it works here using your latest form and the modified .js:

    You have created the folder 'HSSSave '?

    Also, make sure the .js file is in the correct application folder and restart Acrobat:

    Hope get you it working (and when you do you can include a timestamp or timestamp in the name of file; as the script automatically replaces an existing file with the name of TEA).

    N.

  • What is with the box with Red x to always take pictures?

    When I receive e-mails with still photos, all I get are boxes red x in the upper left corner.  How to receive pictures?

    Try to uncheck the option to block related images and other external content under Tools | Options | Security.  In addition, if happens to all images, see www.oehelp.com/noimg.aspx

    Steve

  • What are the files with long names, the letters and numbers?

    I have several labels of large folders with names very long "ae61cbac70034e54059be539829a7e", that means these and I can delete them?

    Hello, TerriML,

    Performs a search of malicious programs.  Boot safe mode with networking

    Download the following tool and an analysis of the system.  I suggest also disable the system restore because the malware is known to hide in the restore points.

    http://www.Microsoft.com/download/en/details.aspx?displaylang=en&id=16

    Turn off System Restore in Windows XP

    http://support.Microsoft.com/kb/310405

    Files such that you listed are known to the Windows operating system files - I advise until you know still don't not to tamper with them.

    Folder in which you made to locate these files in?  Is there an extension at the end of the file name?  Example: .dll, .sys, .ini

    What is e717295f-174-46de-ae61?

    e717295f-174-46de-ae61 truly is a process belonging to Microsoft Windows Operating System System. It is used by a lot of different software on your computer. Many programs, you are familiar with that run as stand-alone executables, such as e717295f-174-46de-ae61. However, most of the services are executed can operate independently. That of why, e717295f-174-46de-ae61 loads these files and runs himself. This is why you will often find several copies of an e717295f-174-46de-ae61 running on the Windows Task Manager.

Maybe you are looking for

  • Cannot remove / job has already been canceled printer

    I have a Macbook Pro 10.10.5. All of a sudden, he started printing 449 jobs that I can't cancel. I have also the same never loaded this print jobs. If I click on delete and then I get a message: "cannot delete / Job #387 is already cancelled - cannot

  • Satellite U200-181: no sound with Vista!

    Hello! Who is wrong? Guys, where sound? Where can I get the correct driver?

  • Pavilion dv7-6b56nr: input HDMI not working not

    My laptop old 4 year was quite slow and unresponsive at times so I am here yesterday & downloaded some updates driver including audio and video. It runs a lot faster now, but today I have connected my laptop to my TV that I made hundreds of times thr

  • error 2738 install bell u998

    I am trying to install the turbo Bell U998 key on my Vista desktop.  Keep getting error 2738 (could not access VBScript runtime for custom action) my U727 has been completely uninstalled before trying the new installation of stick.  Help, please Inco

  • OfficeJet 4620: officejet 4620 e-all-in-one no scan

    The scanner stopped working when connected by USB... .error message says "computer could not communicate with the printer. I then connected the wireless network and the test results said that I had a successful my printer wireless installation I prin