Create a secondary named calculation in a repeating subform based on a drop down list?

Hi all

I need a little crazy script. Not sure it is even possible.

What I have:

  1. repeating subform SummarySub amounts
    1. calculation at the end of the form TotalOver field gives the total dollar amount of all iterations of SummarySub

      so far, so simple. but then:
  2. I need another, repeating the SubRow subform at the end of the form to give to other total:
    1. based on the drop-down list the name of the originator in SummarySub
    2. and break out the totals of all iterations of SummarySub based on payer such as chosen by the user names.

Ideally, the subform (the principal totals) (B) at the end of the form would add instances as the user leaves the field name of the payer. I was not able to find a way to make and to keep the value in the field (name of the payer) of the additional instance.

All this makes sense?

I'll appreciate any help.  I'm trying to learn more about JavaScript in LC, but my bills just keep coming...

Thank you very much

Laura

Dropbox - AFBS_OverpaymentReport_121914.pdf

Hi Laura,

Take a look at the modified version of your form, https://sites.google.com/site/livecycledesignercookbooks/home/AFBS_OverpaymentReport_01011 5.pdf? attredirects = 0 & d = 1.  I added a subform called PayerTotals, which has a summary of insurance created in his event to calculate.  The code looks like.

var oFields = xfa.resolveNodes("SummarySub[*]"); 

var nNodesLength = _SummarySub.count; 

var nSum = 0; 

var insuranceCompanies = {}

for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++) { 

 var item = oFields.item(nNodeCount);

 if (!item.InsuranceCompany.isNull && !item.OverpaymentAmount.isNull) {

 if (insuranceCompanies[item.InsuranceCompany.rawValue]) {

 insuranceCompanies[item.InsuranceCompany.rawValue] += item.OverpaymentAmount.rawValue

 else {

 insuranceCompanies[item.InsuranceCompany.rawValue] = item.OverpaymentAmount.rawValue

  nSum += item.OverpaymentAmount.rawValue; 

totalover.rawValue = nSum;

_PayerTotal.setInstances(0);

for (var insuranceCompany in insuranceCompanies) { 

 var payerTotal = _PayerTotal.addInstance();

 payerTotal.InsuranceCompany.rawValue = insuranceCompany;

 payerTotal.totalover.rawValue = insuranceCompanies[insuranceCompany]; 

Hope this helps

Bruce

Tags: Adobe LiveCycle

Similar Questions

  • Change an amount (that docks a calculation) based on a drop-down list

    Hi all.

    As I said in the title, I'm trying to dynamically change a field (called CostSalesforce) dynamically from the selection of the field drop-down list (salesforce_company) and have this indictment in a running total that I have form and quantity changes.

    2015-10-22_1343.png

    Fixed the amounts you want to use as the values of export for each of the items in the drop-down list field, and then use this field in your calculation as you would a text field.

  • Different calculation based on the drop-down list

    I'm trying to figure out how to change the formula of a derived field in the selection in an adjacent drop-down list.

    For a simple example, trying to find the total amount paid on a loan, would you go Total paid = capital + (main * Int * time). But you may pay more depending on if you pay a fee.

    So what I have works when I enter the formula in the field "Total paid", but trying to integrate the list drop-down for the fees (which is either "Yes" (value = 1) or "No" (value = 2)), I can't figure out how to add the tax, which is $ 50.

    In the drop-down menu, I like an output event:

    Switch (this.rawValue)
    {
    case '1 ':
    totalPaid.rawValue = capital + (Principal * (rate / 100) * time) + 50;
    break;

    case '2 ':
    totalPaid.rawValue = capital + (Principal * (rate / 100) * time);
    break;

    }

    Could someone take a look at this and tell me what I'm doing wrong? I'll post a link to the form that you can see the details (if I do this right!)

    https://Acrobat.com/#d=L7YF3np55Dc7aBOM46qITw

    Thank you!

    Hello

    You just need to use .rawValue to access the value of each object.

    Here is the form to the you: https://acrobat.com/#d=7J3ho * YeHyJzQLK1AEFtWw

    Good luck

    Niall

  • Hidden visible repeatable subform based on drop-down list selection.

    LiveCycle - hidden repeatable subform becomes visible when a "MO" is selected. However, if "MO" is replaced by "KS" or any other State in the expandable lines, visible subform should back to hidden.

    Hello

    to be able to do so, you should have your drop-down list in a repeatable subform which should be considered your main earthquakes Canada, so you can have 5 drop-down lists with each subform respectively 1 comes with it.

    So let's say that your drop-down list in a repeatable subform, and you have another subform linked to this drop-down list below

    in your drop down list exit event list, you should have if statements to determine what value is chosen, and then according to the selected value display you or hide the subform

    This.parent.index is the index of the subform you want to hide, if your combo is directly in the subform repeat you to the other subforms you hide / show

    If (this.getDisplayItem (this.selectedIndex) == "MO") {}

    Page1.resolveNode ("repeatSubform [" + This.parent.index.ToString () + "]"). Presence = "visible";

    } else {}

    Page1.resolveNode ("repeatSubform [" + This.parent.index.ToString () + "]"). Presence = "hidden";

    }

    I hope this helps!

  • Create a dynamic drop-down list field in Adobe Acrobat Pro XI

    Hi all. I am creating a field in one of my forms using Adobe Acrobat Pro XI. I have a drop down list of 'core' items, and according to what is selected in the list, I want a second drop-down list to give different choices. I've searched and searched and have javascript that I thought might work, but maybe I'm have a mistake or I'm place javascript code in the wrong place, because it does not work. I know very, very little about javascript, any help would be so appreciated.

    I use Adobe Acrobat Pro XI. I added a "new field" and selected "drop-down list. The domain name is ProvType. The options of the menu drop-down are:

    Hospitalized patients

    External consultations

    Doctor

    I have "Commit selected value immediately" selected. The field is not validated. The format is 'none '. There is no measures or calculations associated with it.

    I then created another dropbox and named SubProvType. Under Actions, I selected the trigger as the mouse upwards and then selected the Action "executes a JavaScript script. I selected the Add button and he hit in the JavaScript editor:

    Switch (ProvType.rawValue)

    {

    case "Hospitalisation":

    this.setItems ("Hospice, hospital, Nursing Facility");

    break;

    "outpatient": case

    this.setItems ("adult day Center, Home, others");

    break;

    case 'doctor ':

    this.setItems ("surgeon, general practitioner, neurologist");

    break;

    }

    What I want to do is:

    If "Hospitalization" is selected, I want only the following options to be available in the second drop-down list box "SubProvType":

    Palliative care

    Hospital

    Nursing facility

    If "outpatient" is selected, I want only the following options to be available in the second drop-down list box "SubProvType":

    Adult day Center

    Home

    Other

    If the 'doctor' is selected, I want these options to be available in the second drop-down list box "SubProvType":

    Surgeon

    Family practice

    Neurologist

    However... when I close form editing and try to select a different option in the ProvType field, SubProvType field is left blank and there is no options available. Also, there are no errors.

    I must be missing something, but I have no idea where to start. Thank you in advance for any help anyone can provide.

    Use this code as the ProvType custom validation script (and remove any code that you have associated with SubProvType):

    switch (event.value) {
        case "Inpatient":
            this.getField("SubProvType").setItems(["Hospice,Hospital,Nursing Facility"]);
            break;
        case "Outpatient":
            this.getField("SubProvType").setItems(["Adult Day Center,Home,Other"]);
            break;
        case "Physician":
            this.getField("SubProvType").setItems(["Surgeon,Family Practice,Neurologist"]);
            break;
    }
    
  • Is it possible to create interactive drop-down lists that reference the tables on pages separate from the PDF?

    I'm looking to create a user to input PDF in the drop-down lists are used to search for tables, however, I'm not very familiar with the options that are available or if this is even possible?  Also, is it possible to write a substantive code that could read the text of the user entered to perform a search or even solve an equation? Can someone let me know if these elements are possible and/or let me know what adobe program may be required to accomplish these tasks? Thank you!

    PDF documents have no concept of "tables" as MS Word or MS Excel has. There is content that looks like a table.

    Acrobat JavaScript knows tables and form fields. So we could have a table in JavaScript and complete a series of fields that looks like a table. You can use JavaScript to find the table.

    JavaScript in Acrobat can accept user entries in the fields and pop-up windows.

    It is possible to solve theoretical equations the user if the good rating or coding is used.

    D.P. Story is an evangelist generated LaTex PDF to create PDFS with mathematical symbols, and he also created the AcroTex product that allows to create educational tools that includes mathematics calculation self placement tests.

  • I created a PDF form with several drop downs, all with the same drop-down values. When I select a value of 1 in the drop-down list fields, it breeds in all others - which I don't want. How can I fix?

    I created a PDF form with several drop downs, all with the same drop-down values. When I select a value of 1 in the drop-down list fields, it breeds in all others - which I don't want. Can I fix?

    I am fairly new to this, but I think it has to do with the way you have drop them downs named. Copy you a then keep stick in each area? If so, that's the problem. You must rename each with a different number: Dropdown1, Dropdown2, etc. I think this might solve the problem.

  • A drop-down list can do the calculation based on the value selected in a drop down list?

    Form Acrobat X Pro Adobe

    Can I have a drop down list create a calculation based on the value selected in the menu drop-down?

    We have a set lunch and want the user to choose to be "A lunch', 'Lunch B'"C Lunch"or"just the milk. "

    It is for each of the 5 days of the week. There are therefore 5 drop downs, which have all the same 4 above choice.

    If the user chooses among the 3 lunches and then put $2.00 in the total box at the end of the line. If 'Just the milk' may put 0.50 in the box.

    The total area at the end of the line must keep a record of all 5 days and give a total.

    So if someone chooses lunch A LUN, sea and Sun and just milk for Tuesday and Thursday and then the total for this week must be $7,00

    Is it possible by using code or something?

    I did it in Excel, but we need it is an Adobe pdf file.

    TIA

    OK the total box has a 10 all the time to make it look like $ 2.00 for

    everything.

    Before even that I chose something there are 10 in the box.

    I am a newbie to Adobe scripting Total used VB/A .NET etc ' 1980

    However.

    Can you do any debugging in code?

    Initialize the sum

    var sum = 0;

    Make a loop on the drop-down list boxes and add the cost of the invoice sum

    for (var i = 1; i)< 6;="" i="" +="1)">

    Sum += getField("Week1Day"_+_i).value == 'just milk? 0.50: 2,00;

    }

    Set this field to the amount

    Event.Value = sum;

  • create the mailing list option missing from 'File', 'New' drop-down list in the 38.3.0 version

    Hi all

    I'm trying to create a mailing list using the steps described in the online documentation, but the "Mailing List" does not appear in the fly-out drop-down list. What I am doing wrong?

    In addition, what is the best way to import a mailing list I have in Eudora?

    TIA

    straysaver

    Thank you for your response. New list appears, under address book.

  • Access a drop-down list component created in fom runtime C++

    Hello everyone.

    I included a file "Settings.qml" as a ComponentDefinition in my file "main.qml" as follows:

    *******************************
    main.qml
    *******************************
    
    Page {
        id: page
    
        //App menu
        Menu.definition: MenuDefinition {
            settingsAction: SettingsActionItem {
                title: "Settings"
                imageSource: "asset:///icons/ic_settings.png"
                onTriggered: {
                    var settings = settingsSheet.createObject(_cam);
                    settings.open();
                }
            }
        }
    
        //Main container
        Container {        Camera {            id: cameraQML            objectName: "cameraQML"        }    }
    
        //Attached objects
        attachedObjects: [
            //*****this is the component definition****
            ComponentDefinition {
                id: settingsSheet
                source: "Settings.qml"
            }
        ]
    }
    

    Then, in the "Settings.qml" file, I have something like that.

    On the crack of onCreationCompleted I call you access of wich C++ function to the cameraQML component and gets the available resolution values and add them to the drop down list component.

    ***********************Settings.qml***********************
    
    Sheet {
        id: settingsSheet
        objectName: "settingsSheet"
        peekEnabled: true
        content: Page {        Container {            DropDown {
                    title: "Capture Resolution"
                    objectName: "resolution"
    
                    options: [
                        Option {
                            text: "16:9"
                            value: 16/9
                        }
                    ]
    
                    onCreationCompleted: {
                        _cam.loadResolutionValues();
                    }
    
                    onSelectedValueChanged: {
                        //_cam.selectResolution(selectedValue);
                    }
                }
            }    }}
    

    The PROBLEM comes when I try to access the menu item drop down because, even if I get error when you call the function findChild(), I do when I try to add Options by calling the add() function:

    ******************applicationui.cpp******************
    
    AbstractPane* root;Camera* cameraQML;DropDown* resolutionsDD;
    
    void AppliactionUI::ApplicationUI() {    //code...    QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);    qml->setContextProperty("_cam", this);    root = qml->createRootObject();    cameraQML = root->findChild("camera");    //code...}void ApplicationUI::loadResolutionValues() {
        QVariantList reslist = camaraQML->supportedCaptureResolutions(CameraMode::Photo);
                    //**I don't get error by calling this function
            resolutionsDD = root->findChild("resolution");
    
            //**The app do crashes when calling any of these three functions
        //resolutionsDD->setTitle("Choose an option");        //resolutionsDD->removeAll();
        //resolutionsDD->remove(resolutionsDD->at(0));    for (int i = 0; i < reslist.count(); i++) {
            qDebug()<<"QVatiant value:"<add(Option::create().text(res.width()+"x"+res.height()).value(reslist[i]));
        }
    }
    

    I thought it was a problem with the type of value, I was put in the service. value() when you create an option, but then I realized that, while trying to change the title from the drop-down list, or delete i ' ts options that the application crashed also.

    This makes me think that the problem is that I'm not a correct reference for component drop-down menu QML due to the fact that this drop-down list does not exist when the application starts and is created until the user opens the Settings.qml file. Also, I think that this is a problem with all that stuff parent and child, but of course, it's just a feeling.

    I'd really appreciate your help on this type of problem. I'm not experienced enough to know what is the right way to get a reference of work to the drop down list component in question in a situation like this

    Thank you very much in advance!

    P.D. I'm sorry, I know that my English is not very good. Hope you do not misunderstand

    Hello
    Very probably findChild returns NULL and a NULL pointer dereference causes the crash. I remember there was problems with findChild during the use of the leaves.

    Try from the drop-down list directly to the function as an argument:

    (1) in applicationui.cpp:

    After:
    QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
    
    Add:
        // This is needed for passing DropDown in function parameters from QML to C++
        qmlRegisterType("bb.cascades", 1, 0, "DropDown");
    

    (2) modify the function declaration for:

    Q_INVOKABLE void loadResolutionValues(bb::cascades::DropDown *dropDown);
    

    (3) in QML:

    DropDown {
      id: dropDown
      ...
      onCreationCompleted: {
         _cam.loadResolutionValues(dropDown)
    
         // _cam.loadResolutionValues(this) // maybe this will also work, but I haven't checked
    
      }
    }
    
  • create a drop-down list

    It would be possible to create a drop-down list to the fields of an external database or excel file?

    TKS

    Make sure your form is a form dynamic XML, if you do not find why you cannot connect to the data source share your form... There must be something that you are missing.

  • Count the items in the drop-down list by repeating the subform if the user selects "S/o".

    I'm counting the number of drop-down lists the user selected "N/A" in a repeating subform. I want the total appear in a numericfield or textfield. Here is my script that unfortunitly does not work and my page layout form. I placed it in the ready event: layout so the total is updating the number of changes of N/A.

    Hierarchy.GIFScript.GIF

    Hello

    I put the code in the text box, something like calculate event;

    var result = 0;

    instanceCount var = _Subform2.count;

    var instance = Form1.resolveNodes ("Subform2 [*]");

    for (var i = 0; i)< instancecount;="">

    {

    If (instances.item (i). Table1.row2.score.RawValue == 'N/a') {}

    result ++;

    }

    }

    this.rawValue = result;

    The reference to the "_Subform2.count" will ensure that the code is executed whenever an instance is added or deleted.

    Concerning

    Bruce

  • How to create the drop-down list?

    I tried to find a way to reach this menu drop down animated and I can't.  I'm somewhere between (animation using the accordion panel and the substitution effect the composition).

    Any help would be appreciated.  It is the example of what I'm trying to achieve.

    Retired military community Washington DC | Hawks landing

    Thank you!

    Hello

    You can create the same drop-down list using the ToolTip Widget composition but the only way that you can add on turnover and deployment will be discoloration.

    Please check the attached file. http://adobe.ly/1IxxKfO

    Another alternative is to create a lively border animation and use it in Muse as a file OAM.

    Concerning

    Vivek

  • How to set a repeating subform based on a value selected in a drop down list?

    Please forgive me if this is somewhere, but I spent a few hours searching and have not led to what.

    I have a drop-down list that allows the user to select the number of teams in you listing (1-5). Then I have a subform with all the necessary information for each team. I wish that the subform to repeat automatically based on the number selected in the drop-down list, because I need this information for each of the two teams by registering.

    Thank you!

    In the case of exit of the drop-down list, in formcalc, put something like:

    teams of var = $.rawValue

    var counter = 1

    While (counter< teams)="">

    Subform2.instanceManager.addInstance)

    Counter = counter + 1

    endwhile

    This assumes you have already 1 version of the subform. If you are a beginner with no condition (meter while doing<=>

  • How to create the drop-down list, as in the generator of the APEX?

    Hello

    I use the theme 2. I would like to create a drop-down list as in Apex Application Builder, where, on top, you see home | Application Builder | SQL workshop. When you click on one of them, a menu drops down.

    Is it possible to do with standard APEX or I have to do some Javascript coding?

    Tamas

    Hello
    I have them tested again, as I'm new to apex and that I am in the process of upgrading my knowledge by reading books and documentation on the apex, but you may be interested in these plugins
    located @ http://www.apex-plugin.com/

    * [url http://www.apex-plugin.com/oracle-apex-plugins/region-plugin/warp11-css-menu_85.html] Warp11 CSS Menu *.
    * [url http://www.apex-plugin.com/oracle-apex-plugins/region-plugin/drop-down-menu_60.html] Drop-Down Menu *.
    and my favorite
    * [url http://www.apex-plugin.com/oracle-apex-plugins/region-plugin/jquery-menu_82.html] jQuery Menu *.

    Hope this helps

    Concerning
    Jean-Yves

Maybe you are looking for

  • Question on the wall adaptor 24W

    IM buying an adapter of Anker 24W for my iPhone wall charger 6 and I wonder if it will load fast but not damage my phone battery at all? It's a big change for watts wall adapter for me.

  • After the crash and 32.0.3 update I can't recover lost tabs

    Due to the failure of my pc crashed while I was surfing.After the reboot, I restarted Firefox and unfortunataly it did update. However, after the update I couldn't choose reload tabs/reload the previous session. I got the sessionstore.bak files and I

  • Hard drive recovery or support removes all other partitions?

    If I create an extra partition on my HP Pavilion hard drive and use a drive letter F: to store data and then use the partition recovery or media to restore to factory settings, my data secure or the recovery procedure to format the entire hard drive?

  • Command + tab to open the Finder window does not

    Sorry to post this again - the first accidentally got marked as resolved, but it is not and I still need help. I recently installed at El Capitan on my iMac, and now, when I use the command + tab to toggle an application by opening a window of Finder

  • Registration Data (Voltage) of pressure for 1 transmitter) MS Excel 2) printing and replay) 3.

    Hello I have to take a blood pressure of a pressure through my USB sensor OR 6009.The DC voltage will be continuous and variable. I am display it on a graph like shown in the VI. (1) how to save the data as a text? I want to save the amplitude(Y axis