Need Script to Calculate Checkboxes

Hi,
I need a script to calculate a total based on the number of checkboxes checked. If there are 15 checkboxes, 1-5 checks would multiply by X, if there are 6-10 checks multiply by Y, and if there are 11-15 checks, multiply by Z. The more checks, the lower the rate to multiply per check.
(To clarify, the checkboxes are for units that need to be repaired. The more units that need to be repaired, the lower the rate per repair.)
So it is something like: if, then, else?
With adding the check boxes to determine what the rate is, x, y, or z?
I'm totally new to scripting so I really appreciate any help. Thanks!!

If you'd like someone to suggest specific code, you will need to include the names of the check box fields.

Similar Messages

  • Need some help for checkbox

    Hi and Evening to Everybody,
    I have a Scenario where i need to select an entire row using the check box. Let me first define the Situation. I created a Simple Sql-report where the first column is a Simple Checkbox and the second column is a display only name and followed by the rest 5 columns as a checkbox.
    my table structure is :
    **create table satt (SELECT_ALL VARCHAR2(10), Name VARCHAR2(50), Object1 VARCHAR2(10), Object2 VARCHAR2(10), Object3 VARCHAR2(10), Object4 VARCHAR2(10), Object5 VARCHAR2(10));**
    Now i had a requirement where i need to Check All or Uncheck All Checkbox by clicking SELECT_ALL column header and i made it using
    simple java-script :
    "<input type="Checkbox" onclick="$f_CheckFirstColumn(this)">"
    Now i need to Check all checkbox in a row by clicking any of the SELECT_ALL check boxes. (Say i have 5 checkboxes in SELECT_ALL column and if i click 3rd checkbox... i need the entire 3rd row checkbox to be checked on click of that 3rd check box).
    I hope i was clear with my question. i did my best. Please help me out with this... Im eagerly lookin for the solutions.
    Thanks & Regards,
    - The Beginner.
    Edited by: 854477 on Jul 18, 2011 1:50 AM

    Dear BEGINNER..
    Assuming that you're using a standard table based layout for the report, what you need to do is add some code in the HTML attributes of the checkbox in the first column..
    The following javascript would set all other checkboxes in the same ROW as the first checkbox to the same state as it is.
    onclick="if (this.checked) {$f_CheckAll(this.parentNode.parentNode, true);} else {$f_CheckAll(this.parentNode.parentNode, true);}"NOTE: that this will only fire if the first checkbox on the row is actually clicked by the mouse. It won't fire if the first checkbox in the row is set by the CHECK_ALL in the column header.
    Hope this helps.
    Doug gault
    www.sumneva.com

  • Script to calculate space usage at the database level.

    Hi,
    Can someone provide me a script to calculate the Total space, Used space and Free space for all tablespaces within a database??
    I have been trying to use the below combinations in my queries and both provide different results..
    1) dba_data_files & dba_free_space
    select t.tablespace, t.totalspace as " Totalspace(MB)", round((t.totalspace-fs.freespace),2) as "Used Space(MB)", fs.freespace as "Freespace(MB)", round(((t.totalspace-fs.freespace)/t.totalspace)*100,2) as "% Used", round((fs.freespace/t.totalspace)*100,2) as "% Free" from (select round(sum(d.bytes)/(1024*1024)) as totalspace, d.tablespace_name tablespace from dba_data_files d group by d.tablespace_name) t, (select round(sum(f.bytes)/(1024*1024)) as freespace, f.tablespace_name tablespace from dba_free_space f group by f.tablespace_name) fs where t.tablespace=fs.tablespace order by t.tablespace;
    2) dba_extents & dba_free_space
    select t.tablespace, t.totalspace as " Totalspace(MB)", round((t.totalspace-fs.freespace),2) as "Used Space(MB)", fs.freespace as "Freespace(MB)", round(((t.totalspace-fs.freespace)/t.totalspace)*100,2) as "% Used", round((fs.freespace/t.totalspace)*100,2) as "% Free" from (select round(sum(d.bytes)/(1024*1024)) as totalspace, d.tablespace_name tablespace from dba_extents d group by d.tablespace_name) t, (select round(sum(f.bytes)/(1024*1024)) as freespace, f.tablespace_name tablespace from dba_free_space f group by f.tablespace_name) fs where t.tablespace=fs.tablespace order by t.tablespace;
    Thanks in advance,
    regards,
    Arul S

    -- check the total,used and free space in tablespaces
    select     a.TABLESPACE_NAME,
         a.BYTES MB_total,
         b.BYTES MB_free,
         b.largest,
         a.BYTES-b.BYTES MB_used,
         round(((a.BYTES-b.BYTES)/a.BYTES)*100,2) percent_used
    from
              select      TABLESPACE_NAME,
                   sum(BYTES)/1048576 BYTES
              from      dba_data_files
              group      by TABLESPACE_NAME
         a,
              select      TABLESPACE_NAME,
                   sum(BYTES)/1048576 BYTES ,
                   max(BYTES)/1048576 largest
              from      dba_free_space
              group      by TABLESPACE_NAME
         b
    where      a.TABLESPACE_NAME=b.TABLESPACE_NAME
    order      by ((a.BYTES-b.BYTES)/a.BYTES) desc;
    Regards
    Asif Kabir

  • I need script which will filter a set of groups by name, and then give a CSV with direct members

    I need script which will filter a set of groups by name, and then give a CSV with direct members
    say it like,
    $groupitems = Get-ADGroup -SearchBase "DC=fincaint,DC=local" -Filter {Name -like "*AppUsers"}
    ForEach ($groupitem in $groupitems)
            IF ($groupitem.objectClass -eq 'user')
       Get-ADUser $groupitem | FT Name, Email, City, Title | Export-Csv c:\member.csv
          IF ($groupitem.objectClass -eq 'group')
       Get-ADgroup $groupitem | FT GroupName, GroupDN | Export-Csv c:\member.csv

    Hi Dhiravia,
    It's been a while. How is it going? If the suggestion provided by ThmsRynr doesn't help, for scripting questions, in order to get better help, it's recommended that we ask for advice in the following scripting forum.
    The Official Scripting Guys Forum
    https://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?forum=ITCG
    Best regards,
    Frank Shen
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • Need script to hide and view checkboxes

    Hello, basically I have two checkboxes that are names "In good order" and "Not in good order." What I want to do is if the checkbox for "In good order" is checked then "Not in good order" disappears and vice versa.  I managed to write the script for that however I also need "Not in good order" to reappear if "In good order" is unchecked just in case the client checked the wrong box they can still see the other option and check it.  How do I do that?  Please help!  Thanks!

    Try like this..
    Place two check boxes and put the below code in CheckBox1 Click event.
    if(CheckBox1.rawValue ==1)
    CheckBox2.presence = "hidden";
    else
    CheckBox2.presence = "visible";
    Place the below code in CheckBox2 Click event.
    if(CheckBox2.rawValue ==1)
    CheckBox1.presence = "hidden";
    else
    CheckBox1.presence = "visible";
    Thanks
    Srini

  • Need Help Writing a Calculation Script Using a Checkbox

    Hello,
    I am new to Adobe X Standard and Javascript.  I have all other parts of my fillable change order form completed except the tax calculation.  I have the following fields:
    Text Field = SUBTOTAL
    Text Field = TAX
    Checkbox = Exempt
    I would like the calculation in the TAX field to be as follows:
    If the checkbox = false then SUBTOTAL * .05, else SUBTOTAL = 0. 
    It really doesn't seem that complex but learning javascript on the fly is apparently above my skill level.  I would greatly appreciate someone's help in getting this initial calculation working.  I greatly appreciate your time.  Thank you.

    Your description is a bit confusing to me. Do you want to calculate the value of the TAX field? In the last bit of pseudocode, you seem to be setting SUBTOTAL to 0. Do you want the tax to be the SUBTOTAL value times 0.05 if not exempt and 0 if exempt? If so, the custom calculate script of the TAX field can be:
    event.value = getField("Exempt").value === "Off" ? +getField("SUBTOTAL").value * 0.05 : 0;
    This is equivalent to:
    if (getField("Exempt").value === "Off") {
        event.value = +getField("SUBTOTAL").value * 0.05;
    } else {
        event.value = 0;

  • Creating order form and need Java Script to calculate unit price and quantity in Acrobat Pro.

    Hi,
    I am creating order form in Acrobat Pro , and I have
    code
    Order Quantity
    Unit price $
    201
    500
    $ 0.52
    201
    1000
    $ 0.36
    202
    300
    $ 0.26
    202
    500
    $ 0.2
    How make Subtotal and Total price with Java script.
    I do not know how to write java script.
    Anyone can help me?
    Thanks,

    Thanks for your response. I have 2 quantities and 2 Unit price for each code, I know a simple sum in calculation it works for 1 unit price and quantity.  Can you please let me know how to do it? One of the expert sent m this:
    //change field names as needed
    var qt1 = this.getField("qt1").value;
    var up1 = this.getField("up1").value;
    var qt2 = this.getField("qt2").value;
    var up2 = this.getField("up2").value;
    event.value = (qt1 * up1) + (qt2 * up2);
    I put this in total text field (calculation tab , Custom script) , but it  did not worked.
    I appreciate it if anyone can help or give me  suggestion.

  • Need scripting help to open and save 250 MSWord files

    I'm clueless about programming and I have 250 Word files that need to be saved down as Word 5.1. I briefly tried to learn Word Macros, AppleScript, Automator, with no luck so far.
    What's the best software to use for this and how do I do it? Is there already a script somewhere that I can download?
    Thanks!

    I'm clueless about programming and I have 250 Word files that need to be saved down as Word 5.1. I briefly tried to learn Word Macros, AppleScript, Automator, with no luck so far.
    What's the best software to use for this and how do I do it? Is there already a script somewhere that I can download?
    Thanks!

  • Need advise to calculate stock difference (Theoric values vs real values)

    I know there is a transaction named MI20
    This transaction is able to give me the needed info... except it gives me the info un units. Meaning, if a box of certain product has 12 SKU and we have 12 boxes, the result window shows 144 SKU.
    This is not a bad thing... except for the fact that the company does not only want to see the SKU but they want to see the boxes. If there are 145 SKU of the same product in stock, they want the result window to show it like this:
    Item: <ItemName>, Boxes: 12, Units: 1 (This is a rough example)
    Now... I don't think it is a good idea to touch the standard code, so I decided to create a new (and simplified) transaction that asks only the parameters they want, they agreed to this and so I started... but stopped almost right away.
    "Why?" you might ask. Well, I don't know the tables I sould read to determine a difference in stock between what's supposed to be and what really is.
    My common sense tells me the actual stock is somehow introduced to the system with some document. But where? Which table(s)?
    Also, how can I calculate the theoric values ? Initial stock (date of implementation) minus sales, plus purchases? That's what common sense tells me but... also tells me that is only going to be slower as time passes by, not to mention I don't know where to look into (again).
    After the people who implemented SAP left, we were left adrift. No data dictionary, no ABAP training, no language refference manual, no nothing :s
    I don't want source code to be written here... but I'm kinda desperate, I tried to understand the standard code of the MI20 but I get lost. I'm reading the RM07IDIF report and while I can see some tables there, I can't ger a grip on what's happening >___<
    What would you say is a good starting point or course of action? (Don't say "Get formal ABAP trainning"... that's not going to happen, my boss haven't even pressed the buttons to get a book from the SAP store ;_;) 
    I know the ISEG, MARA, T!58 tables play a role in the whole movie (How, that's still a mistery I have to unveil).I  I've also noticed some structures that (to my understanding) are used mostly to store partial results.
    I know this question is very vague and even might look like "Do the work for me", but believe me, I'm not looking for source code to copy paste. I'm trying to understand the system and the relation between the tables in order to start coding.
    Thanx in advance for your help and understanding : /
    Edited by: Compiux on Feb 17, 2012 12:05 AM
    Edited by: Compiux on Feb 17, 2012 12:06 AM
    Edited by: Compiux on Feb 17, 2012 12:07 AM
    Edited by: Compiux on Feb 17, 2012 12:07 AM

    I know there is a transaction named MI20
    This transaction is able to give me the needed info... except it gives me the info un units. Meaning, if a box of certain product has 12 SKU and we have 12 boxes, the result window shows 144 SKU.
    This is not a bad thing... except for the fact that the company does not only want to see the SKU but they want to see the boxes. If there are 145 SKU of the same product in stock, they want the result window to show it like this:
    Item: <ItemName>, Boxes: 12, Units: 1 (This is a rough example)
    Now... I don't think it is a good idea to touch the standard code, so I decided to create a new (and simplified) transaction that asks only the parameters they want, they agreed to this and so I started... but stopped almost right away.
    "Why?" you might ask. Well, I don't know the tables I sould read to determine a difference in stock between what's supposed to be and what really is.
    My common sense tells me the actual stock is somehow introduced to the system with some document. But where? Which table(s)?
    Also, how can I calculate the theoric values ? Initial stock (date of implementation) minus sales, plus purchases? That's what common sense tells me but... also tells me that is only going to be slower as time passes by, not to mention I don't know where to look into (again).
    After the people who implemented SAP left, we were left adrift. No data dictionary, no ABAP training, no language refference manual, no nothing :s
    I don't want source code to be written here... but I'm kinda desperate, I tried to understand the standard code of the MI20 but I get lost. I'm reading the RM07IDIF report and while I can see some tables there, I can't ger a grip on what's happening >___<
    What would you say is a good starting point or course of action? (Don't say "Get formal ABAP trainning"... that's not going to happen, my boss haven't even pressed the buttons to get a book from the SAP store ;_;) 
    I know the ISEG, MARA, T!58 tables play a role in the whole movie (How, that's still a mistery I have to unveil).I  I've also noticed some structures that (to my understanding) are used mostly to store partial results.
    I know this question is very vague and even might look like "Do the work for me", but believe me, I'm not looking for source code to copy paste. I'm trying to understand the system and the relation between the tables in order to start coding.
    Thanx in advance for your help and understanding : /
    Edited by: Compiux on Feb 17, 2012 12:05 AM
    Edited by: Compiux on Feb 17, 2012 12:06 AM
    Edited by: Compiux on Feb 17, 2012 12:07 AM
    Edited by: Compiux on Feb 17, 2012 12:07 AM

  • In need of assistance using checkbox and conditional formats

    Hello,
    I'm trying to set up a command to meet the following:
    When I opt to use a checkbox format in say cell "G2" - I would like to setup a conditional format along the lines of...
    =IF G2 is TRUE (i.e. checked), then change the color of cell "A2" to some color.
    Can anyone help me with the line command for this?

    L.
    Seems like it should be easy, doesn't it? There are options to doing this, but none are exactly obvious. The problem for you is that conditional formatting is based on the content of the cell being formatted, not some other cell. A typical use is to, say, bold content over a certain limit, or make the display of a zero value invisible.
    In Numbers08, you have only a couple of options:
    Use an IF-test to alter your content, or use an overlay table or tables. The solution you pick will depend on whether the content was calculated or input directly. If the content was input from the keyboard, that's the most difficult situation since there is no equation to modify.
    So, do you want to change the color of the Text, or the Fill, of cell A2? And, how important is this formatting to you? If it involves extra columns or tables and a lot of fussing around, do you still think you need it?
    Jerry

  • Need script to place multiple single page pdfs in ID pages

    Does anyone know of a script that would place a whole folder full of single page pdf files into an indesign document one per page, alphabetically by pdf file name, and ideally add new pages as needed. The last part is optional, as the ID document could already have the required number of pages, all using the same master page with the the picture frame already in place.
    In my current project, the pdfs are all the same size as the ID document page size.
    This would be along the lines of the scripts that place multipage pdfs, but for single page ones. I have tried first creating a multipage pdf by inserting a folder full of single page pdfs at the end of an initial pdf. Acrobat 8 pro does this very well indeed, but selects the pages from the source folder in random order. I need them in alphabetical order.
    Thanks for any insight,
    Al

    For this project I could equally well use a script that would place or re link to a new pdf in a single page ID document, print device independent postscript with some sort of unique or sequential filename, and repeat the process for a whole folder of source pdf files. No new pages need to be added, and the new pdf could replace the prior one.
    What I am after is a device independent ps file for these pdf files. The ones produced by batch processing from Acrobat 8 Pro do not offer enough control, as in that method I would need *only* the black separation.
    Thanks,
    Al

  • Need code for this checkbox validation

    There are 3 checkboxes on my form cb1,cb2,cb3.I need the code for the below validations..
    if I check the checkbox cb1 then cb2,cb3 should be disabled(grayed, should not allow to
    check). when i unchecked cb1 all 3 boxes should be enabled and then if i check cb2
    then cb1,cb3 should be disabled.
    At any point of time only one checkbox should be checked and
    remaining 2 will be disabled/grayed.
    hope its clear.
    thanks in advance
    Devender

    Hello,
    You can enable/disable your check box items with the:
    Set_Item_Property( 'item_name', ENABLED, PROPERTY_TRUE | PROPERTY_FALSE ) Built-in.
    If Checkbox_Checked( 'chk1' ) Then
       Set_Item_Property( 'chk2', ENABLED, PROPERTY_FALSE ) ;
       Set_Item_Property( 'chk3', ENABLED, PROPERTY_FALSE ) ;
    End if ;
    ...Francois

  • Need Script to split multi-paged ID file into multiple single paged ID files

    I have created a 366 page document (and have 2 more to create). None of the text threads from page to page, and there are no master page items. Each page is destined to be used as a single block that will be copied and pasted into a master document by a database driven plugin (and for color editing reasons it needs to be separate .indd files). For expediency, I created these as a single document because I could import the text with ID style tags to pre-format the text (with all text blocks threaded). I then broke all the text threads using API's Auto Unstich plugin. We then manually tweaked the text of each page.
    Gluon once sold a plugin called DocSplitter, but it has not been updated since CS1 and does not work with CS4.
    Before you ask why I don't have the database plugin create multiple single page docs — the plugin doesn't currently save to individual ID docs (yet - feature to be released in 3 months).
    I know that scripting could possibly do what I need, but I have little to no experience with AppleScript (7 years ago) and none with Javascript. Would love to find a pre-packaged solution and am willing to pay someone for it.
    To guess there are two ways a script could work:
    1) script breaks the doc into single pages (not sure how that would work really) but the files would be named based on page number — i.e filename-01.indd, filename-02.indd, etc.
    2) script selects all objects on a page, groups the objects, copies the objects, creates a new page, pastes the objects and then saves the file in the same manner as number 1 above - loop and repeat for al the pages.
    Any help would be greatly appreciated.
    many thanks
    Roger

    Hi Roger,
    This topic was discussed in this thread: http://forums.adobe.com/message/1113562#1113562
    Check out this script:
    http://creative.mediabox.fr/index.php?app=core&module=attach&section=attach&attach_id=6440
    Kasyan

  • Need script for ID 5.5

    Not even sure if this can be done with a script. A client send me an ID book in version 5.5. She set up her margins so that there would be extra space at the spine, but she didn't bother to set up her master pages in a two page spread so that her margins would be mirrored. What we need to do is move everything on each recto page (each page has at least two text frames in columns, plus call-out boxes with a separate floating text frame inside, sometimes photos, sometimes headings, all in separate frames) a quarter of an inch to the right. So, everything on the page has to be selected and moved, but only the recto pages. It could be done manually, but I don't know if she is able to do it.

    Try this:
    http://indesignsecrets.com/move-every-object-on-every-page-toward-or-away-from-spine.php

  • Need script to export Indesign to word and keep word index codes

    Hi,
    I have a document and the index was created by importing word docs with indexentries. Now the client wants to revise the book and wants the text converted back to Word, but he wants to keep the orginal word index codes. Is that possible? Exporting as tagged text results in showing the index codes, but also much other codes which are not needed.
    Would be greatfuull for some tips, or preferable a script that does the trick.
    kind regards
    Peter
    Indesign  cs5.5 Imac 27 inch. Max osx 10.7.4 language Dutch

    designer1955 wrote:
    Exporting as tagged text results in showing the index codes, but also much other codes which are not needed.
    What were you going to do with this Tagged Text file? That's only good for re-importing it back into InDesign.
    Anyway, it doesn't require a script at all. I had the clever idea of testing this, and indeed: index entries in InDesign are exported in RTF.

Maybe you are looking for

  • Can't drag songs to new playlist

    I have created several playlists in the past, but now it will not allow me to drag songs to a new playlist folder. I have illiminated the possibility that I might have too many playlists by simply deleting a few, and then trying again but to no avail

  • Bridge freezes up

    bridge is freezing up.  Win7.  installed latest upgrades etc.  never happened before

  • Running Logic 8.0.2 under Mac OS X Lion

    1. Run Automator. 2. Drag "Run Shell Script" action and drop in Automator. 3. Assuming you installed Logic in the default location, paste the following to the Run Shell Script dialog:           /Applications/Logic\ Pro.app/Contents/MacOS/Logic\ Pro ;

  • Reg :billing type selection

    Dear ALL, I raised the following question in sdn sd Forum, we have blling type but single order type. e.g Particulars billing type order type Unregistered dealer zurd zdor Registered Dealed zrd1 zdor I donot want my user to select the billing type wh

  • Premiere Pro CS4 crashes after installing Microsoft DirectX

    It looks like I just made the biggest mistake of installing Microsoft DirectX causing Premiere Pro CS4 to crash. When I create a new project and a new sequence to open it crashes. I submit a report and try it again and it crashes again and again. I u