Keep sublist (child list) expanded ?

Have parent(Emp Report) and child list( hobbies,addr) like the following
Emp Report
-Hobbies report
-Addr report
Problem: when I click hobbies report, it leads me to the correct page but when I came back to this parent list page, the list always collapsed. How can I keep the list expanded ?
Thanx in advance.
Munshar

I'm not sure how to fix your issue, but one trick you could
use is to make
the list a fixed length, longer than you need, no matter
what:
if myList.count < 40 then
myList[40] = 0
end if
That way the list will always contain 40 elements, and just
be a bunch of
0's past your last element... Might help anyway.
Dave -
Adobe Community Expert
www.blurredistinction.com
www.macromedia.com/support/forums/team_macromedia/

Similar Messages

  • Child list as a table doesn't show data until window is resized.

    Hi,
    I am trying to develop a page made up of a list of objects. Each object has some properties that I want to display as a form and then a child list of objects. This child list of objects, i am displaying as a table. I have the following page and backing bean. Normally, to display a list of objects each of which has a sublist of objects, I can use a "nested iterator". But I am not able to refer to the child iterator as a part of the parent iterator.
    The page is as follows:
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1" binding="#{backingBeanScope.backing_frmBuilder9.d1}">
    <af:messages binding="#{backingBeanScope.backing_frmBuilder9.m1}"
    id="m1"/>
    <af:form id="f1" binding="#{backingBeanScope.backing_frmBuilder9.f1}">
    <af:table value="#{bindings.frms.collectionModel}" var="row"
    rows="#{bindings.frms.rangeSize}"
    emptyText="#{bindings.frms.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.frms.rangeSize}" rowBandingInterval="0"
    binding="#{backingBeanScope.backing_frmBuilder9.t1}" id="t1"
    columnStretching="none" horizontalGridVisible="false"
    verticalGridVisible="false">
    <af:column sortProperty="name" sortable="false" id="c3"
    width="500">
    <af:panelFormLayout id="pfl2">
    <af:inputText value="#{row.bindings.name.inputValue}" label="Name"
    required="#{bindings.frms.hints.name.mandatory}"
    columns="#{bindings.frms.hints.name.displayWidth}"
    maximumLength="#{bindings.frms.hints.name.precision}"
    shortDesc="#{bindings.frms.hints.name.tooltip}"
    id="it1">
    <f:validator binding="#{row.bindings.name.validator}"/>
    </af:inputText>
    <af:inputText value="#{row.bindings.comment.inputValue}"
    label="#{bindings.frms.hints.comment.label}"
    required="#{bindings.frms.hints.comment.mandatory}"
    columns="#{bindings.frms.hints.comment.displayWidth}"
    maximumLength="#{bindings.frms.hints.comment.precision}"
    shortDesc="#{bindings.frms.hints.comment.tooltip}"
    id="it3">
    <f:validator binding="#{row.bindings.comment.validator}"/>
    </af:inputText>
    <af:inputText value="#{row.bindings.logFile.inputValue}"
    label="#{bindings.frms.hints.logFile.label}"
    required="#{bindings.frms.hints.logFile.mandatory}"
    columns="#{bindings.frms.hints.logFile.displayWidth}"
    maximumLength="#{bindings.frms.hints.logFile.precision}"
    shortDesc="#{bindings.frms.hints.logFile.tooltip}"
    id="it2">
    <f:validator binding="#{row.bindings.logFile.validator}"/>
    </af:inputText>
    <af:inputText value="#{row.bindings.id.inputValue}"
    label="#{bindings.frms.hints.id.label}"
    required="#{bindings.frms.hints.id.mandatory}"
    columns="#{bindings.frms.hints.id.displayWidth}"
    maximumLength="#{bindings.frms.hints.id.precision}"
    shortDesc="#{bindings.frms.hints.id.tooltip}"
    id="it4">
    <f:validator binding="#{row.bindings.id.validator}"/>
    </af:inputText>
    </af:panelFormLayout>
    <af:table value="#{backingBeanScope.backing_frmBuilder9.childData}"
    var="row1" rows="#{bindings.formulas.rangeSize}"
    emptyText="#{bindings.formulas.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.formulas.rangeSize}"
    rowBandingInterval="0" id="t2"
    inlineStyle="width:200px; height:100.0px;" width="400">
    <af:column sortProperty="rhs" sortable="false"
    headerText="#{bindings.formulas.hints.rhs.label}"
    id="c8">
    <af:inputText value="#{row1.rhs}"
    label="#{bindings.formulas.hints.rhs.label}"
    required="#{bindings.formulas.hints.rhs.mandatory}"
    columns="#{bindings.formulas.hints.rhs.displayWidth}"
    maximumLength="#{bindings.formulas.hints.rhs.precision}"
    shortDesc="#{bindings.formulas.hints.rhs.tooltip}"
    id="it6"/>
    </af:column>
    <af:column sortProperty="lhs" sortable="false"
    headerText="#{bindings.formulas.hints.lhs.label}"
    id="c6">
    <af:inputText value="#{row1.lhs}"
    label="#{bindings.formulas.hints.lhs.label}"
    required="#{bindings.formulas.hints.lhs.mandatory}"
    columns="#{bindings.formulas.hints.lhs.displayWidth}"
    maximumLength="#{bindings.formulas.hints.lhs.precision}"
    shortDesc="#{bindings.formulas.hints.lhs.tooltip}"
    id="it5"/>
    </af:column>
    <af:column sortProperty="lineComment" sortable="false"
    headerText="#{bindings.formulas.hints.lineComment.label}"
    id="c7">
    <af:inputText value="#{row1.lineComment}"
    label="#{bindings.formulas.hints.lineComment.label}"
    required="#{bindings.formulas.hints.lineComment.mandatory}"
    columns="#{bindings.formulas.hints.lineComment.displayWidth}"
    maximumLength="#{bindings.formulas.hints.lineComment.precision}"
    shortDesc="#{bindings.formulas.hints.lineComment.tooltip}"
    id="it7"/>
    </af:column>
    </af:table>
    </af:column>
    <af:column sortProperty="comment" sortable="false"
    headerText="#{bindings.frms.hints.comment.label}" id="c2"
    rendered="false"/>
    <af:column sortProperty="logFile" sortable="false"
    headerText="#{bindings.frms.hints.logFile.label}" id="c4"
    rendered="false"/>
    <af:column sortProperty="id" sortable="false"
    headerText="#{bindings.frms.hints.id.label}" id="c1"
    rendered="false"/>
    <af:column id="c9" headerText="Save" rendered="false">
    <af:commandButton actionListener="#{bindings.save.execute}"
    text="save" disabled="#{!bindings.save.enabled}"
    binding="#{backingBeanScope.backing_frmBuilder9.cb1}"
    id="cb1" rendered="true"/>
    </af:column>
    <af:column id="c5" headerText="Formulas" rendered="false"/>
    </af:table>
    <af:table var="row" rowBandingInterval="0"
    binding="#{backingBeanScope.backing_frmBuilder9.t3}" id="t3"
    rendered="false">
    <af:column sortable="false" headerText="col1" id="c10" width="400">
    <af:panelFormLayout id="pfl1">
    <f:facet name="footer"/>
    <af:inputText value="#{row.bindings.name.inputValue}"
    label="#{bindings.frms.hints.name.label}"
    required="#{bindings.frms.hints.name.mandatory}"
    columns="#{bindings.frms.hints.name.displayWidth}"
    maximumLength="#{bindings.frms.hints.name.precision}"
    shortDesc="#{bindings.frms.hints.name.tooltip}"
    id="inputText1">
    <f:validator binding="#{row.bindings.name.validator}"/>
    </af:inputText>
    <af:inputText value="#{row.bindings.comment.inputValue}"
    label="#{bindings.frms.hints.comment.label}"
    required="#{bindings.frms.hints.comment.mandatory}"
    columns="#{bindings.frms.hints.comment.displayWidth}"
    maximumLength="#{bindings.frms.hints.comment.precision}"
    shortDesc="#{bindings.frms.hints.comment.tooltip}"
    id="inputText2">
    <f:validator binding="#{row.bindings.comment.validator}"/>
    </af:inputText>
    </af:panelFormLayout>
    <af:table value="#{backingBeanScope.backing_frmBuilder9.childData}"
    var="row1" rows="#{bindings.formulas.rangeSize}"
    emptyText="#{bindings.formulas.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.formulas.rangeSize}"
    rowBandingInterval="0" id="table1">
    <af:column sortProperty="rhs" sortable="false"
    headerText="#{bindings.formulas.hints.rhs.label}"
    id="column1">
    <af:inputText value="#{row1.rhs}"
    label="#{bindings.formulas.hints.rhs.label}"
    required="#{bindings.formulas.hints.rhs.mandatory}"
    columns="#{bindings.formulas.hints.rhs.displayWidth}"
    maximumLength="#{bindings.formulas.hints.rhs.precision}"
    shortDesc="#{bindings.formulas.hints.rhs.tooltip}"
    id="inputText3"/>
    </af:column>
    <af:column sortProperty="lhs" sortable="false"
    headerText="#{bindings.formulas.hints.lhs.label}"
    id="column2">
    <af:inputText value="#{row1.lhs}"
    label="#{bindings.formulas.hints.lhs.label}"
    required="#{bindings.formulas.hints.lhs.mandatory}"
    columns="#{bindings.formulas.hints.lhs.displayWidth}"
    maximumLength="#{bindings.formulas.hints.lhs.precision}"
    shortDesc="#{bindings.formulas.hints.lhs.tooltip}"
    id="inputText4"/>
    </af:column>
    <af:column sortProperty="lineComment" sortable="false"
    headerText="#{bindings.formulas.hints.lineComment.label}"
    id="column3">
    <af:inputText value="#{row1.lineComment}"
    label="#{bindings.formulas.hints.lineComment.label}"
    required="#{bindings.formulas.hints.lineComment.mandatory}"
    columns="#{bindings.formulas.hints.lineComment.displayWidth}"
    maximumLength="#{bindings.formulas.hints.lineComment.precision}"
    shortDesc="#{bindings.formulas.hints.lineComment.tooltip}"
    id="inputText5"/>
    </af:column>
    </af:table>
    </af:column>
    </af:table>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    The child list i am getting onto the page via the backing bean. *"#{backingBeanScope.backing_frmBuilder9.childData}"*
    The problem I am facing here is, the first time the page loads I am not able to see the child data in the table. If I resize the page, then I am able to see the data in the child table. Anybody faced this issue before ? And any way to overcome this problem ? Please let know.
    Thanks,
    pawan.

    There is no check box for Advanced Options as they're already there when editing. Except for the partition options, which obviously aren't.
    This was mentioned time ago and I'm pretty sure they have an enhancement planned for this. Might be a looong time until you get it though. Better request this officially on the SQL Developer Exchange, so other users can vote on the request and add weight for sooner implementation.
    Regards,
    K.

  • Can anyone help with issue whereby Music, Podcasts and Audiable Book Apps keep stopping when listing via Headphones following IOS 7.01 Updates on Iphone 4?

    Can anyone help with issue whereby Music, Podcasts and Audiable Book Apps keep stopping when listing via Headphones following IOS 7.06 Updates on Iphone 4?
    I have tried the following all ready:
    Resetting Phone
    Resetting Settings on phone
    Change Headsets to speakers
    Reinstalled Phone
    Updated to IOS 7.1
    No of the above has resolved the issue does anyone have any ideas?

    Can anyone help with issue whereby Music, Podcasts and Audiable Book Apps keep stopping when listing via Headphones following IOS 7.06 Updates on Iphone 4?
    I have tried the following all ready:
    Resetting Phone
    Resetting Settings on phone
    Change Headsets to speakers
    Reinstalled Phone
    Updated to IOS 7.1
    No of the above has resolved the issue does anyone have any ideas?

  • Parent Child list form using infopath 2013

    Hi All
    I have two SharePoint list heaving parent child relation ship ( one parent have multiple child) now i want to create a single form in info path 2013 using code less solution . I am using SharePoint Online don't want to use c# code.
    Journey Man

    Hi,
    Please check this
    https://www.sharepointdrive.com/blog/how-to-establish-a-parent-child-relationship-in-sharepoint/
    http://sharepoint.stackexchange.com/questions/6493/how-to-automatically-link-parent-in-child-list-new-form
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Firefox 4 will not let me keep my bookmarks listed on the side bar. I can open them there but once I click somewhere else they go away.

    Firefox 4 will not let me keep my bookmarks listed on the side bar. I can open them there but once I click somewhere else they go away. On previous Firefox versions I could display my bookmark folders down the left side of my screen and just leave them there, accessing saved bookmarks when I needed to. Now with FF4 I can open a vertical column of my bookmark folders by clicking on bookmarks in the navigation bar but this won't stay there; if I click elsewhere they disappear. I could put a bookmark toolbar on my screen but this takes up more vertical space. I have lots of horizontal space that's unused. How can I go back to the display of bookmarks in previous versions?

    You can fix that by going to View -> Sidebar and click on Bookmarks.
    Or you could simply use a shortcut
    ''control + B''

  • IE6 child div expands width of parent div

    I have a problem that has been vexing me...hopefully someone can answer it.
    I want to have a child div expand to overlap the div next to it. It is for a calendar so that all day events that stretch for multiple days can stretch over and cover multiple days.
    In IE6, the child div expands the width of the parent div and wrecks my display. The "proper" way that FF, Safari, and IE 7 & 8 do is that the child div will overlay the parent. The parent div's width remains unchanged, no matter what the width of the child is. IE6 incorrectly expands the width of the parent div to match that of the child div.
    I've set up a small example so you can see the difference. Check it out in FF and then in IE 6. Notice that in IE6 the "parent" div is too wide. In FF it looks fine.
    Any way to get IE6 to behave like FF in this case?
    Thanks!
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Div Test</title>
    <style type="text/css">
    <!--
    .parent {
         width: 200px;
         background-color: #FFC;
         border: 1px solid #000;
         float: left;
    .child {
         width: 300px;
         background-color: #CAEDFF;
         border: 1px solid #000;
         z-index: 20;
         position: relative;
    -->
    </style>
    </head>
    <body>
        <div class="parent">
        Parent Content
        </div>
        <div class="parent">
        Parent Content
        </div>
        <br>
        <br>
        <div class="parent">
          <div class="child">Child Content</div>
        </div>
        <div class="parent">
        Parent Content
        </div>
    </body>
    </html>

    I see now you posted your code.  Thanks.
    For best cross browser results, the floated container needs to be wide enough to accomodate everything inside it. Some browsers will resize others won't.   For another approach see my code.  This uses a disjointed rollover method.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Div Test</title>
    <style type="text/css">
    .parent {
         padding: 8px;
         width: 200px;
         background-color: #FFC;
         border: 1px solid #000;
         float: left;
    /**formerly know as .child**/
    .parent a span {
         width: 300px;
         padding: 10px;
         background-color: #CAEDFF;
         border: 1px solid #000;
         position:absolute;
         top:55px; /**adjust as required**/
         left:55px; /**adjust as required**/
         display:block;
         visibility:hidden;
    .parent a:hover span,
    .parent a:active span,
    .parent a:focus span {visibility:visible}
    .parent a:hover,
    .parent a:active,
    .parent a:focus {text-decoration:none; visibility:visible;}
    </style>
    </head>
    <body>
    <div class="parent">
    <p>Parent content</p>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sit amet iaculis purus. </p>
    <a href="http://alt-web.com/DEMOS/CSS-Disjointed-Text-Rollover.shtml">Link to Child Layer<span>Child Content renamed to <strong>.parent span</strong>.  Content inside the span tag is absolutely positioned. <br>
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sit amet iaculis purus.</span></a>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sit amet iaculis purus. </p>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sit amet iaculis purus. </p>
    </div> <!--end parent -->
    </body>
    </html>
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com

  • Parent Child list

    Experts --
    Is it possible to use an evDRE() to get a parent/child list of all the elements in a dimension?  I want to see a long list of every element in the dimension with its associated parent alongside. 
    If an evDRE() can't do it, is there another method?
    Thanks...Marv

    Brian --
    Thanks very much!  As far as I could tell, the MEMBERS selection with EvDRE() didn't provide what I wanted.  It returned a list of all the members, but there was no indication of parent.
    But using Administration and Dimension "View Member Report" I got just what I needed--Child and Parent in two separate columns on an Excel sheet.  Perfect...
    Thanks...Marv

  • Removing a child instance from a parent child list. - non L2 Caching

    I have a parent Entity
    Parent
    int id
    String name
    @onetomany
    List <Child> list
    and a child Entity
    Child
    int id
    String name
    First, let me say, I have L2 cache turned off.
    So lets say I have a parent record with three children and I want to remove child 2. I have found if you remove the child only in the EM then when you select the parent again, it shows the child still being there even though the child has been removed from the db. I liked only having to remove the child because its only one instance to pass and remove over the web. But with that said, how do I remove the entity our of the parents Children list so it no longer shows up in the front end in the list? I cant use the selected index in the front end because I sort the data.
    Or is it better to save the state of Parent too? But if so, what if Parents Children is hundreds of records. Thats alot of overhead for one record to be deleted. Could use some help here. Thanks in advance.

    You should always maintain bi-directional relationships. You need to remove the child from the parent.
    Since you are not caching, if you acquire a new EntityManager after commit, the parent's child will be gone.
    If you refresh the parent in the same EntityManager after commit, then it will be gone.
    If the collection is really big, then consider not mapping it, just query for it if you need it. There is no point having a relationship that is too big to read.
    Note that if you use weaving, and a List, then remove() will not trigger the collection to instantiate in EclipseLink (nor add, but contains or size will).

  • To get discret sublist from List

    Hi
    I need to get a sublist from List but it is not continuous list from the List.
    The method subList(int fromindex, int toindex) in List class returns a sublist with the specific range(from-to index).
    But how can it be made, such NOT continuous sublist that consists of index 0,1,2,5,6,8,10, ... of base List.

    A sublist is not a new list, but a certain view (think of it as a "window") of an existing list. So, when something in the original range changes, it changes in the sublist too.
    So, when you try to combine sublists of the same List, this will reflect on the original list and lead to your concurrentModificationException.
    The question is: is the sublist really what you want? Because the reason for sublists is to examine changes in a certain range, but what you want sounds more like a completely new composed list.
    I suggest you create a new List with exactly the items you want to have. For example:
    List myList = new ArrayList(someSublist);
    myList.add(someItem);
    myList.addAll(anotherList);
    // ...However, sorting changes in the original List will not reflect in the new List. For that, you might to write your own sublist, that points to the indices you'd like to watch instead of the objects.

  • Variable to keep a client list

    I was thinking to use a variable to keep a client list which would be eventually used in reports. Without using a variable I have to type the list in case statement.
    Does this feature available in OBIEE?
    Thanks,
    Ted

    I have a list of client number and it is tracked as a group. In other words, all metrics are grouped by two groups (in my list or not in the list). For example, the client numbers are from 1 to 300. In my report, I have only 3 columns (month end date,client group,total balance). For the client group, I have to enter the list in the CASE statement in order to have two separate groups (One with client number between 1 and 300 and other group NOT IN Between 1 and 300). I have found this would work for some ad hoc reports. As I started building dashboard with different reports tracking my portfolio, I have ended up keying in the list in all reports. However, the difficult part is to change list in different reports when updating it. In other programming language, I could keep all client numbers in big list and then use it in other reports by referencing a variable name. Does Oracle BI have similar feature? I am new to Oracle BI tool and not sure about how to approach this problem.
    Any help is appreciated.
    Thanks,
    Ted

  • Anyone know how to keep a child Process from closing when the main Applicaiton is closed

      I have a Web based application that needs to use an older version of Java to run it properly . I have been able to sequence this and use a shortcut to call on Iexplorer.exe to open the browser in bubble and have the old version of Java run in the
    same bubble. This part is working as needed but the issue I have ran into is when a end user opens up a word document from a link  and "check's it out" to modify it and closes the browser it immediately closes the word document along
    with it. So the Question I have, Is there a way to keep a child process open when the main Application is closed . Anyone run into anything similar or any documentation on a way to keep the process alive until the end user closes it?

    Hi There,
    I don't believe there is a way to handle this currently within App-V...Other virtualization products do have the ability to exclude processes and force to run outside or the bubble or exclude them from terminating on shutdown.
    It would be a great feature request for a future release. You can easily request it here:
    http://appv.uservoice.com/forums/280448-microsoft-application-virtualization
    PLEASE MARK ANY ANSWERS TO HELP OTHERS Blog:
    rorymon.com Twitter: @Rorymon

  • Drop-down list expand upwards

    Hi All,
    I have a drop down list at the end of my page. when expanding it, the options cannot be seen in their entirety as the page ends immediately after. Users have to use the scroll bar to see all the options. Is there a way to make a drop down list expand upwards instead of downwards?
    Thanks.

    Just as a test, I tried this out...   I am assuming this is what you are trying to do? I put the drop down list at the very bottom of the page and it automatically does this. Maybe you are using an old version of LiveCycle?

  • Sum child list items and update parent total using javascript

    I have a SharePoint 2010 Parent/Child list setup using a lookup field to join both the lists, this is working well.
    The Parent list contains requisition requests and the child list contains related item details. Each of the related child list items has a 'Line Item Total' field. I need to aggregate the Line Item Totals in the child list and place the result in a 'Requisition
    Total' in the parent. So for any given parent record the sum of it's related child 'Line Item Totals' is reflected in the 'Requisition' total in the parent row.
    I am struggling with the JavaScript code below. I am trying to aggregate Line Item Totals for a given Requisition#? Could someone please review and advise?
    <script language="javascript" src="/Purchasing/Documents/jquery-1.8.2.js" type="text/javascript"></script>
    <script language="javascript" src="/Purchasing/Documents/jquery.SPServices-2014.01.min.js" type="text/javascript"></script>
    <script>
    $(document).ready(function()
     $('select[title=Requisition#]').children().attr('disabled',true);
     $("input[title='Old Amount']").attr("readonly","true").css('background-color','#F6F6F6');
       // Retrieve the name of the selected parent item.
       var strParent=$("select[title$='Requisition#'] :selected").text(); 
     splist li = web.lists["ReqDetails"]; // This is the child list
        spquery q = new spquery();
        q.Query= "<Where>" +
         "<And>" +
          "<Neq>" +
           "<FieldRef Name='ID'/><Value Type='Number'>0</Value>" +
          "</Neq>" +
          "<eq>" +
           "<FieldRef Name='LinkID'/><Value Type='Number'>ReqID</Value>" +
          "</eq>" +
         "<And>" +
        "</Where>" +
        "<OrderBy>" +
         "<FieldRef Name='LineItemTotal'/>" +
        "</OrderBy>"
        q.ViewFields = string.Concat("<FieldRef Name='LineItemTotal' />");
        q.ViewFieldsOnly = true; // Fetch only the data that we need
        splistitemcollection items = li.getitems(q);
        foreach(SPListItem item in items)
        sum += parseInt(item["LineItemTotal"], 10);
      alert(sum)
     </script>
    Rick Rofe

    I do something similar for a PO Header/PO Detail set of lists. I use SPServices to pull the data.
    I put this code in the child edit page - so any time any child is edited, the parent is updated. I get all children records and total them up (except for the item I'm displaying at the current time. I add that value in directly from the form itself.
    <script type="text/javascript" src="/Javascript/JQuery/JQueryMin-1.11.1.js"></script>
    <script src="/Javascript/JQuery/jquery.SPServices-2014.01.min.js"></script>
    <script>var poNumber = '';
    var poDetailID = '';
    $(document).ready(function() { var queryStringVals = $().SPServices.SPGetQueryString();
    poNumber = queryStringVals["PO"];
    poDetailID = queryStringVals["ID"];
    function PreSaveAction() {
    // update the PO header with the total of all items + shipping + adjustments
    var query = "<Query><Where><And><Eq><FieldRef Name='Title' /><Value Type='Text'>" + poNumber + "</Value></Eq><Neq><FieldRef Name='ID' /><Value Type='Counter'>" + poDetailID + "</Value></Neq></And></Where></Query>";
    var viewFields = '<ViewFields><FieldRef Name="Total" />';
    viewFields += '</ViewFields>';
    var poTotal = 0.00;
    $().SPServices({
    operation: "GetListItems",
    async: false,
    listName: "PO Details",
    webURL: "/po",
    CAMLViewFields: viewFields,
    CAMLQuery: query,
    completefunc: function (xData, Status) {
    //alert(xData.responseText);
    $(xData.responseXML).SPFilterNode('z:row').each(function() {
    if($(this).attr("ows_Total")) {
    //alert($(this).attr("ows_Total"));
    poTotal += Number(parseFloat($(this).attr("ows_Total").split(";#")[1],2).toFixed(2));
    // add in this changed line (we skipped it above)
    var qty = $('input[title="Quantity Ordered"]').val();
    var price = $('input[title="Price"]').val().replace(',','');
    var extend = Number(qty)*Number(price);
    poTotal += extend;
    //alert(poTotal);
    // update the PO Header
    $().SPServices({
    operation: "UpdateListItems",
    async: false,
    listName: "Purchase Orders",
    webURL: "/po",
    ID: poID,
    valuepairs: [["Total", poTotal]],
    completefunc: function (xData, Status) {
    //alert(xData.responseText);
    $(xData.responseXML).SPFilterNode('z:row').each(function() {
    return true;
    Robin

  • Parent/Child list passing variables.

    Hello All,
    I have a task that involves setting up a Parent/Child Relationship lists and takes it a step further and adds documents to a document library from both the Parent list and/or the Child list.   I have related web parts on both lists to the document library.
    I also have a related web part of the child list on the Parent display page. I followed this
    resource to automatically pass the ID: which is the Title Column of the Parent List to a Lookup Column in the Child List.   I would like to pass the Lookup Field item information from the child list to the document library, but the resource is using
    the "getParameterBYName('ID')" to create the variable passed into the cookie.   I cannot use the ID of the Child List because it is referring to the Child Item and not the Parent item. I am passing this item into a Lookup Field on the Document
    Library Form which filters related Child items when the Parent is selected.  Can anyone help me pass the Lookup Field item or get the url of the Lookup Item to pass into the cookie?
    I have tried:  "var ParentID = document.getElementByID('SPField').innerHTML"   This gets me the content for the field, but this does not work for setting the cookie.
    Any help is appreciated.
    James
    James Pruitt

    And here is the Document Library Upload from the Parent List:
    The pre-filled in Parent drop down filters the Child drop down.   I am trying to have the same action except from the child Display Form, I need both drop downs to be pre-filled based on the item being displayed:
    Here is the code that I am using.  It takes a cookie from the Parent List and pre-fills the first drop down.  From that we have a filtered second drop down.
    <script language="javascript" type="text/javascript" src="http://ai-seb03dev-001:5000/Shared%20Documents/jquery-1.11.1.min.js"></script>
    <script language="javascript" type="text/javascript" src="http://ai-seb03dev-001:5000/Shared%20Documents/jquery.SPServices-2014.01.min.js"></script>
    <script language="javascript" type="text/javascript">
    $(document).ready(function() {
    var ID = getCookie("ID");
    //alert(ID);
    if(ID != undefined)
    SetLookup("Parent", ID );
    function getCookie(name) {
    var cookieArray = document.cookie.split(";");
    for (index in cookieArray)
    var keyValuePair = cookieArray[index].split("=");
    var key = keyValuePair[0];
    key = key.replace(/^\s+|\s+$/g, "");
    if (key == name)
    var value = keyValuePair[1];
    return value;
    // Sets the value of a lookup field whether it is an input or select field
    function SetLookup( fieldTitle, lookupVal)
    // Set default value for lookups with less than 20 items
    if ( $("select[title='" +fieldTitle+ "']").html() != null)
    var element = $("select[title='" + fieldTitle +"']");
    $(element).val(lookupVal);
    // disable field to stop users from changing it if added from Parent list
    $(element).find('option:not(:selected)').attr('disabled',true);
    else
    var element = $("select[title='" + fieldTitle +"']");
    $(element).val(lookupVal);
    // enable field if adding a document manually
    $(element).find('option:not(:selected)').attr('disabled',false);
    //else
    choices = $("input[title='" +fieldTitle +"']").attr("choices");
    hiddenInput = $("input[title='" +fieldTitle +"']").attr("optHid");
    $("input[id='" +hiddenInput +"']").attr("value",lookupVal)
    choiceArray = choices.split("|");
    for (index = 1; index < choiceArray.length; index = index + 2)
    if (choiceArray[index] == lookupVal) {
    var element = $("input[title+'" +fieldTitle +"']");
    $(element).val(choiceArray[index - 1]);
    //disable field to stop pesky users from changing it
    $(element).attr('readonly',true);
    //hide the button that is used for the dropdown list
    $(element).next('img').hide();
    // Handle the filtering of the Parent Item and Related Child Items
    $().SPServices.SPCascadeDropdowns({
    relationshipList: "FundingRecordsLive",
    relationshipListParentColumn: "AgreementParent",
    relationshipListChildColumn: "Title",
    parentColumn: "Parent",
    childColumn: "Funding",
    debug: true
    </script>
    I am trying to set a cookie to the url of the SharePoint Lookup Field:
    <a href="http://ai-seb03dev-001:5000/_layouts/listform.aspx?PageType=4&
    ListId={FB7A87B6-0BA5-4764-B28C-B3B8A98218F7}&ID=3&RootFolder=*">
    If anyone knows how to do this, or can suggest another way to pass the Lookup
    Field info, I will very appreciative.
    Thanks, JP
    James Pruitt

  • Parent/Child Lists and Disabling Contextual Ribbon

    I have a display form for a parent list that is setup with web part connections to show list view web parts of some child lists.
    When you click the child list the ribbon displays a "New Item" button for the selected web part's list. How can I stop this from happening?
    I have my own custom new button for the child items, so on the child form I can pre-set the relationship drop down box (and hide it from the user) using a query string value I put in.
    I therefore need to stop the default new button appearing in the ribbon when the user selects the list items web part (because I can't put in the required query string value).
    Any ideas?
    Thanks,
    Richard

    Hi Richard,
    As I understand, you would like to remove New Item button in the display form page of parent-child relationship list. Please add a content editor to use the code below in the Default Display Form:
    <style>
    .ms-list-addnew
    display: none;
    </style>
    Here is the screenshot of my envrionment:
    Regards,
    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] .
    Rebecca Tu
    TechNet Community Support

Maybe you are looking for