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

Hi all,
I need a crazy bit of scripting. Not sure it's even possible.
          What I have:
repeating subform SummarySub with dollar amountcalculation field at end of form TotalOver gives total dollar amount from all iterations of SummarySub
so far, so simple. but then:
I need another, repeating subform SubRow at the end of the form to give another total:
based on Payer Name drop-down list in SummarySub
and break out totals from all iterations of SummarySub based on payer names as chosen by the user.
Ideally, the subform (B) (Payer Totals) at the end of the form would add instances as the user exits the Payer Name field. I haven't been able to figure out how to do that and keep the value in the (Payer Name) field of the added instance.
Does any of this make sense?
I'll appreciate any help.  I'm trying to learn more about JavaScript in LC, but my deadlines just keep coming....
Many thanks
Laura
Dropbox - AFBS_OverpaymentReport_121914.pdf

Hi Laura,
You are right with the need for the nested for loop, If add this code to the calculation event.
    var nTotalRemitted = 0;
    var oAmountsRemitted = item.resolveNodes("SubRowtwo[*]");
    var nRemittedLength = item._SubRowtwo.count;
    for (nRemittedCount = 0; nRemittedCount < nRemittedLength; nRemittedCount++)
        var oRemittedItem = oAmountsRemitted.item(nRemittedCount);
        var nAmountRemitted = parseFloat(oRemittedItem.AmountRemitted.rawValue);
        if (!isNaN(nAmountRemitted))
            nTotalRemitted += parseFloat(oRemittedItem.AmountRemitted.rawValue);
see the sample https://sites.google.com/site/livecycledesignercookbooks/home/AFBS_PTM_bruce%20script_TEST .pdf?attredirects=0&d=1
There are some comments in the sample explaining some of the code
Regards
Bruce

Similar Messages

  • Populate drop-down list in table row or repeating subform

    I am currently working on an Adobe Interactive Form integrated with web dynpro ABAP.  I would like to create a table or repeating subform with a number of drop-down lists populated from SAP.
    I am using the Enumerated Drop-down list from the WebDynproNative menu.  In my WDDOINIT method, I am populating the attributes using the set_attribute_value_set method.  This is working fine when my dropdown is not in a table or repeating subform.  The dropdown is populated and the selected value is returned to SAP when submitting the form.  However, when I place the dropdown in a table row or a repeating subform, the dropdown is not populated.
    Any ideas or suggestions?

    Hi There,
    I am facing problem in Dropdown lists in Subforms.
    I want the region dropdown list values according to country (only for DE) dropdown list value. Both Dropdown lists are in a Subform.
    For that, I have used this in EXIT event of Country Dropdown list:
    if (this.rawValue == "DE Deutschland")
    data.Item.IT_ITEM.DATA.ZZ_REGION.clearItems();
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Schleswig-Holstein","1");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Hamburg","2");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Niedersachsen","3);
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Bremen","4");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Nordrhein-Westfalen","5");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Hessen","6");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Rheinland-Pfalz","7");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Baden-Württemberg","8");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Bayern","9");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Saarland","10");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Berlin","11");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Brandenburg","12");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Mecklenburg-Vorpomme","13");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Sachsen","14");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Sachsen-Anhalt","15");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Thüringen","16");
    else
    data.Item.IT_ITEM.DATA.ZZ_REGION.clearItems();
    It does only change first region dropdownlist value, not others because both dropdown lists are in a Subform.
    Other problem is that it works only when All Country Dropdown lists are "DE". Means, first region dropdown list depends upon not only first country dropdown but also other dropdown.
    My requirement is, If first country Dropdown is "DE", only first Region Dropdown list should be fill, not others. And so on.
    Please provide solution that How can I change all dropdown lists of a Subform dynamically?
    Waiting for reply.
    Thank you
    Chandler Bing

  • Populateing a drop down list in a repeating sub form

    I have been using the scripts from the Purchase Order sample that work with the Country and States/Provinces drop down lists and have modified them to fit my needs. The scripts work great. However I have a drop down list that is in a repeating sub form and the only the drop down list in the first occurance of the sub form works. The others don't.
    I put this line of code in a field called drpOrderedByTeam.
    JobsScript.getJobsOther(xfa, xfa.resolveNode("form1.TimeSheetSF.DetailsSF[*].DetailsTable.DetailsRow.ItemNumber"));
    I thought I just needed to add an "[*]" to the name of the sub form and it would work with all occurances but it doesn't seem so and I'm not sure what else to do.

    Based on your explanations, I've attempted to re-create your form and I think I've got it working the way you'd like it to.
    There are some difficulties with using fields in table headers which are replicated on subsequent pages because while new instances of the header subform and the fields it contains are created, you don't have access to these instances using the header's Instance Manager (I think this is a bug but I'm not sure). This means that you can't iterate through the instances of the header in order to populate the task lists depending on the selection in the team list. One solution for this is to make all header fields Global (select each field and, in the Object palette's Binding tab, set the
    Default Binding property to
    Global). This means that all instances of these fields will share the same value. The effect is that when you change the value of a field on an instance of a header on any page, the change will be replicated on all instances on all pages. The catch, though, is when you use lists in the header. Making list fields global doesn't mean that their item lists are global -- which causes other headaches.
    In the end, because of the problems I've described, I had to resort to cheating a little but if you think about it, it's not really cheating. What the form does is whenever the team list value changes, it removes all instances of the DetailsSF rows. This has the effect of also removing all instances of the DetailTitlesSF headers accross the current page set (and removes all pages but the first one). Then 6 new instances of the DetailsSF row are generated and the DetailTitlesSF header is re-populated using the new selection in the team list. After that, if a new page gets generated because of the number of instances of the DetailsSF rows, the new instances of the task lists in the new instances of the DetailTitlesSF header will have the correct list of items based on the current value of the team list. In the end, even though I'm cheating by removing all instances of the DetailsSF row in order to reset the lists in the DetailTitlesSF header, it's not really cheating because if you change teams, then it should be assumed that all data entered doesn't apply anymore because the tasks change as well... Convinced?
    The best way to understand this is to check-out the sample form.
    Let me know if you have any questions.
    Stefan
    Adobe Systems

  • Help with Hidden Drop Down Lists in RBList subforms

    I have created a form that contains 3 isolated Radio Button lists, each with hidden subforms that are unique per each button.
    Two of my RBLists and subforms work perfectly, showing hidden Drop Down List options and other fields as they should when a button is selected.
    However, RBList3 presents the Drop Down lists as user entry fields only. Each hidden subform in RBList3 contains one drop down menu and one text box for instructions.
    I've used the same javascript to hide/show hidden fields when buttons are selected. All settings seem to match up. Here is a sample of my code:
    if(RBList3.F.rawValue != 2) 
        this.presence = "hidden";
        newsubform.presence = "hidden";
    else if(RBList3.F.rawValue == 2)
        this.presence = "visible";
        newsubform.presence = "hidden";
    Does anyone have any suggestions for how to make my Drop Down Lists in RBList3 show as functional Drop lists?
    I have attached the form for reference.

    Hi Paul,
    I see that the code works for radio button G selection in the change event. However, what I really need to happen...is for the RBList options to be present on the screen without any subform data until the user clicks button E, F or G. If either E or F is selected, then the drop list and the text box would pop up as you currently have them placed on screen.
    My original problem was that the EdgeDropDown2 list loses its functionality when wrapped in a hidden subform (i.e. SubformE or SubformF).
    Can I add code to the change event to make EdgeDropDown2 and PanzDrawTxt appear only if either E or F are chosen. The code you wrote below works only for G selection.
    if(this.rawValue != 3)
        EdgeDropDown2.presence = "visible";
        PanzDrawTxt.presence = "visible";
        EdgePanelChkBxTxt.presence = "hidden";
    }else {
        PanzDrawTxt.presence = "hidden";
        EdgeDropDown2.presence = "hidden";
        EdgePanelChkBxTxt.presence = "visible";   

  • How do I create a drop down list to e-mail a form for signature.

    The desired workflow is for
    1)      Firefighter 1 to complete the top portion of the Agreement
    section, sign in the Firefighter 1 signature field (which locks the top
    portion of the Agreement Section), then select Firefighter 2 from the
    e-mail drop down list and e-mail the PDF form to Firefighter 2;
    2)      Firefighter 2 opens the e-mail and the PDF attachment,
    completes the second portion of the Agreement Section, sign in the
    Firefighter 2 signature field (which locks the bottom portion of the
    Agreement Section), select Lieutenant 1 from the e-mail drop down list
    and e-mail the PDF form to Lieutenant 1;
    3)      Lieutenant 1 opens the e-mail and the PDF attachment, checks
    the approved box, signs the Lieutenant 1 signature field, select
    Lieutenant 2 from the e-mail drop down list and e-mail the PDF form to
    Lieutenant 2;
    4)      Step three continues through Lieutenant 2, Battalion Chief 1
    and Battalion Chief 2
    5)      Battalion Chief 2 sends the fully completed form back to
    Firefighter 1 who copies the completed form to Firefighter 2
    Note: if any of the officers disapprove the agreement the disapproved
    form is immediately sent back to Firefighter 1

    katiesandell wrote:
    how can i create a drop down menu so that when i click on the arrow in the cell i can select from the menu that appears
    Hi Katie,
    Welcome to Apple Discussions and the Numbers '09 forum.
    Numbers vocabulary for this feature is a "Pop-up Menu". It's available as a Cell Format, and is set and edited in the Cell Format Inspector.
    See "Using a Checkbox, Slider, Stepper, or Pop-Up Menu in Table Cells" starting on page 96 of the Numbers '09 User Guide.
    This guide, and the equally useful iWork Formulas and Functions User Guide are available for download through the Help menu in Numbers.
    Regards,
    Barry

  • How can I select from drop-down list and jumping to selected subform?

    I using LC Designer ES2 vers 9. Developing XDP. How can I Select from a drop-down list the appropriate selected subform (jumping to the selected subform on the page)?
    drop-down list...A (jump to subform1)
                             B (jump to subform2)
                             C (jump to subform3)
    subform1
    subform2
    subform3
    ....end of form

    Hi,
    you cannot set focus on a subform but on a field, as only interactive objects can be focussed.
    From a dropdowns exit event the script will look this way:
    switch (this.rawValue) {
              case "A" : xfa.host.setFocus("form1.page2.field1"); break;
              case "B" : xfa.host.setFocus("form1.page2.field1"); break;

  • How do I edit a drop down list in a form just created?

    I have created a form with several drop down lists.  During the design process, I did not enter in data for the drop down, however cannot figure out how to edit that now.  Please help!

    GKaiseril - can you help me please?
    I've created a fillable form in Adobe Professional and my text boxes are prefilling...I did a few tests and it promts me to use the language used in my testing.  I do not want the text boxes to show prefilled options.  I checked Options tab and it does not have any values.  I am not sure why it's prefilling and how to remove it.  Any suggestions?

  • Dynamic Drop-Down list in a table row or subform

    Hi,
    I need to display multiple drop-down list elements dynamically. Each of these DDLs will have different values.
    For example:
    The table will have 2 columns (Student Name text field and Courses drop-down)
    Row 1: Student 1 & Courses of Student1 in DDL
    Row 2: Student 2 & Courses of Student2 in DDL
    When I execute my app, both the drop-downs (i.e. for both the students) are displaying all the courses of all the students. I tried a lot with binding options..
    $record.Students[].Courses[]
    is refering to all elements of the node. If I use the index 0 for Students node, I am getting 1st element rows.. if I use 1, I am getting 2nd element rows,,,
    But How can I set the binding so that Row 1 has only Student 1 courses and Row 2 has Student 2 courses?
    IS THERE A WAY TO DYNAMICALLY SET THE BINDING USING JAVASCRIPT?
    I tried with tables, subforms.. it is not working. It is working fine in plain web dynpro table but not in an interactive form. I am using NW 2004s SP11, Web Dynpro Java. LiveCycle Designer 7.1, Adobe Reader 7.09.
    There are some other posts talking about similar issue.. I tried the solutions mentioned there as well, but nothing worked.
    I would really appreciate if any one can provide a solution or pointer to my problem.
    Thanks
    Ram

    Hey. Uh, this probably isn't the answer you were looking for, but it sounds like you've got a problem with your database design there. Generally speaking, your tables shouldn't have multi-valued fields, in the relational model anyway (sql). Instead, you should look at adding a separate table like EMPLOYEE_HOBBIES. Then you have a foreign key using the employees primary key as the foreign key in the employee_hobbies table, see what I mean? I might have misunderstood your explanation though, I'm not sure.
    Alternatively, you could just have hobbies as a big freeform varchar field, and don't bother to make people separate their hobbies into different fields (you'd have to abandon the drop-down listbox idea in this case). If there's no really important reason to make the distinction, then it's probably easier just to not do it.

  • Creating a formula using a alphabetic drop down list?

    I am creating a work sheet using formulas and drop down list. I have one drop down list that has a list of name and the second list is a list of letter that correspond to those names. (ex: column "J" on line "4 - 29" there is the letter
    "A-Z" and then continues , in column "K" line "4" starts the list of names. In Cell B4 is the drop down list of names in column "K" to choose from, I would like the letter that corresponds to that name automatically
    be put into cell A4, how do I create the formula in cell A4?

    Hi Tina,
    According to your description, please following these steps:
    With your sample as shown in the following figure, select range “J4:K29”, and click
    FORMULAS-Defined Names-Create from Selection, and check
    Right column.
    Then, use the enter formula in A4 “=INDIRECT(B4)”.
    And I upload a TEXT.xlsx file on OneDrive, you can download this file via this link:
    https://microsoft-my.sharepoint.com/personal/v-lzng_microsoft_com/Documents/Shared with Everyone
    Hope it’s helpful.
    Regards,
    Emi

  • Restricting values on the drop down list, while creating a PO

    Hello SAP Experts,
       Could you help me with the following.
      While creating a PO (ME21N), based on the Account Assignment Category(KNTTP) entered , I have to restrict the values in the drop down list for selecting the material group (MAKTL). I have searched some in SDN, but couldn't find anything suitable. Appreciate any help.
    Thank you,
    Sorab

    Could anyone tell me , if it is possible. Has anyone tried this before.
    Thank you,
    Sorab

  • Creating Drop Down Lists in J2ME

    Hello all,
    I'm not an experienced programmer, and I fear that the rumours of posting a crie for help only to be set upon by hundreds of blood thirsty 'newbe' hunters may be true, but here goes none the less.
    Would love to know if any kind soul has hints on how to create drop down lists in J2ME, for selecting a option which would be able to relate to a database (Table).
    At the moment I'm using straight forward TextField entries, which is hardly convenient! :)
    Any help/comments/sweets appreciated!
    Cam

    Hi Cameron,
    Only MIDP 2.0 support drop down list. So if you currently coding in the MIDP 2.0 environment, here are the codings.
    String arr = new String[]{"Happy","Sad"};
    ChoiceGroup ch = new ChoiceGroup("Select Choice:",ChoiceGroup.POPUP,arr,null);
    append(ch);
    Hope this codes is helpful to you.

  • Creating drop-down list for prodname element in metadata causes errors

    Frame 11
    DITA 1.2
    Due to restrictions beyond our control, we must use absurdly long product names. Therefore I want to use drop-down lists to make it easier for the authors to select a <prodname> in the metadata.
    What I did:
    1. In metaDecl.eddmod.fm, I created a new attribute and named it prod.
        a. I made it the Choice, and Required.
        b. The Choices currently are just Internal and RTVI for testing purposes. I'll put the absurdly long ones in when I have it working.
        c. I have a Prefix rule of: In all contexts Prefix: Product Name: <$attribute[prod]>
    2. I imported metaDecl.eddmod.fm to all of these EDDs:
        In the base EDD  folder:
    basemap.edd.fm
    basetopic.edd.fm
    map.eddmod.fm
    topic.eddmod.fm
       In the technicalContent EDD folder:
    concept.edd.fm
    ditabase.edd.fm
    generalTask.edd.fm
    glossentry.edd.fm
    glossgroup.edd.fm
    reference.edd.fm
    task.edd.fm
    topic.edd.fm
    3. I imported the element definitions into all of the following:
    ChapterOutputTpl.fm
    basemap.template.fm
    basetopic.template.fm
    basetopic.template.fm
    topic.template.fm
    generalTask.template.fm
    glossentry.template.fm
    glossgroup.template.fm
    map.template.fm
    ditabase.template.fm
    reference.template.fm
    concept.template.fm
    task.template.fm
    4. I imported the elememted definitions from task.template.fm into my test document (yes, it is a task topic).
    What happened:
    I get the following error message in the console:
    XML Parser Messages (Document Instance)
    Error at file H:\DITA_Westminster\Procedures - Our DITA\Inserting_Product_Names_Versions_In_Metadata\InsertingProductNamesAndVersionsInMetad ata.dita.82F, line 28, char 49, Message: Attribute 'prod' is not declared for element 'prodname'
    Error at line 28, char 71, Message: Not enough elements to match content model  '(prodname,vrmlist,((brand|component|featnum|platform|prognum|series))*)'
    What I did next:
    1. I removed all elements from the general rule of <prodinfo> with the exception of <prodname>. <prodinfo) is the one that had prodname, vrmlist, (brand|component|featnum|platform|prognum|series) in the general rule. I also did a thorough search to ensure that no other element had this same list of element in the general rule. I couldn't find any.
    2. I did the import to the EDDs and templates thing again.
    3. I got the same error message again. <sigh />
    Question:
    Why am I still getting those 2 error messages? They are driving me crazy.
    Marsha

    Alex Gorly and Matt Sullivan solved one of my issues above:
    Message: Attribute 'prod' is not declared for element 'prodname'
    I'm still stumpled on the other one:
    Message: Not enough elements to match content model  '(prodname,vrmlist,((brand|component|featnum|platform|prognum|series) )*)'
    As stated above, I've even removed everything from the general rule of <prodinfo> except prodname and I'm still getting the same error. I've searched everywhere for this general rule and <prodinfo> is the only place I can find it.
    What I really want is: (prodname), (vrmlist)?, (brand | component | featnum | platform | prognum | series)*
    so that vrmlist is optional.
    No matter what I do, unless I include a vrmlist, I get the above message. Currently, our CMS can't handle vrmlist but I don't want to remove it altogether because we may be replacing our CMS.
    Help please!

  • Create a drop down list in a cell within a table ?

    Is there a way to create a drop down list in a cell within a table ? Like the way it can be done in ms word or excell ? I dont mean an interactive pdf/form. I want to create a table in indesign which has drop down lists other people can use to populate a table quickly.

    Not possible. InDesign isn't designed to be form-filling software. At best, it can create fields which can be passed on to a PDF file, which usually further has to be edited in Acrobat Pro.

  • Drop Down List empty when user trying to create a Shopping Cart.

    Hi,
        While Creating a Shopping cart.User is unable to select a vendor or a category from the drop down list,As the Drop down list is empty.I have Checked The Extended Attributes Tab for the user in PPOMA_BBP tcode.Are There any other configurations to be checked.
    Appreciate your inputs!!
    Thanks
    Rakesh.

    Hi Muthu,
                 Thanks For your reply.The User is trying to create a Shopping cart,Whilst creating it he is trying to select a Vendor from the Drop downlist.But the drop down list is showing up empty values.The User is unable to pass the vendor to the shopping cart from the drop down list.
    Thanks
    Rakesh.

  • Create a fragment with web service to populate the drop down list

    Hello,
    Can any one please advise/suggest on how to create a fragment in LiveCycle Designer ES with web service to populate the drop down list so I can re-use it for another form. I already have a drop down list to populate the data from the web serivice but need some advise on how to create a fragment for this drop down list so I can start to embed it in other forms as well.
    Thanks in advance,
    HD

    Did you follow the instructions and have a specific question?  Have you also looked at the documentation http://help.adobe.com/en_US/livecycle/9.0/lcdesigner_qs_fragments.pdf

Maybe you are looking for

  • App/itunes gift card from another country

    Hi For Christmas I was given an app/itunes gift card by a friend, the card was purchased in italy. Now I have just tried to enter the code and guess what? it tells me i cannot redeem it cos my store is Uk not Italy. If i try to change it to Italy it

  • Error with windows 7 bootcamp drivers

    Hello, I've installed Windows 7 via bootcamp and it's working fine, the only issue is that I don't have sound and I read that to get that I should install the drivers from my OS disc. The problem is that when I insert the disc and run the setup file,

  • My Photo Stream not updating

    Iphone 4s with latest Operating System....I take a photo and it shows up fine in Camera Roll. Once in a great while it shows up in My Photo Stream. I manually copy it to another shared stream - then it SOMETIMES shows up on my MacBook Air. Everything

  • PS CC 2014 Exiting Text Edit mode when changing to another application

    I just updated to PS CC 2014 on my iMac running Mac OS X Yosemite. I noticed that if I enter Text Edit mode on a text layer and then change over (CMD+Tab or ALT+Tab) to the word processing app (TextEdit or Word) that Text Edit mode will commit. In PS

  • Network Load Balancing and failover for AFP Sharing

    Dear all, Somebody kindly teach me to use round robin DNS to perform the network load balancing, it's success but not the failover. I have 4 xserve and want to do the load balancing and failover at the same time. I have read the IP failover document