Parent nodes have themselves as childs, in contrast to BW hierarchy

Hello Gurus,
I have a problem concerning hierarchies and grouping in CR2008.
Inserting the hierarchy works fine, but here's the problem:
Every parent node has itself as child node, i.e. the hierarchy shown is:
1
1.1
1.2
1.2.2
1.2.3
instead of the correct:
1
1.2
1.2.3
That even occurs when I just include the Node ID, without any grouping and hierarchy settings.
Such behaviour is undesirable for my purpose, so how can I make Crystal Reports behave like I expect/want? I am completely confused where these additional nodes are originating, as they are definitely not defined in the BW hierarchy. Therefore I suspect the problem somewhere in Crystal, although I have no actual evidence supporting this...
Has anyone an idea how to solve that problem? I have crawled through SDN and unfortunately wasn't able to find a solution...
Thanks!

Hi Ingo,
first I'd like to apologize for the late reply, I was very busy with another project during the last weeks.
It seems to be the bookable nodes setting in the query, at least only such parent nodes are affected that have data posted to themselves. Obviously, the actual parent node as shown in Crystal is the one with data aggregated by Crystal and the child node is the one with the data that was posted to the node.
I'll try to find some free time during the remainder of the week for further investigation and provide additional feedback.
Thanks for your help so far!

Similar Messages

  • FTREE_NODE: Find parent node which has no child nodes

    Hi guys
    Does anybody know how to find a parent node which has no child node(s)?
    I couldn't find any build-in at the online help. Is there a trick to got this?
    Thanks in advance
    Remo

    Hi Remo,
    I misspoke, in my earlier post. The FTREE built-in has defined constants for the possible values that FTREE.NODE_STATE can have -- FTREE.COLLAPSED, FTREE.EXPANDED and FTREE.LEAF_NODE.
    If you wish, rather than testing for a value of '0', you can instead test for a value of FTREE.LEAF_NODE. Both are functionally identical, but using the constants can improve the readability of your code, eliminating the need for additional comments.
    Eric

  • ADF Tree setting focus back to parent node after deletion of child node

    Hi,
    Is there a way to get the focus back to the parent node (or rather any particular node) in a tree?
    I have a use case where we need to get the focus back to the parent node after a child node is deleted.
    Currently the focus is shifted to the next node in the tree, but the need is to get the focus shifted back to the parent node. Also the parent node should be re-invoked to populate to get the latest status after deletion of the child node.
    Any help/pointers?
    Thanks

    Thanks for the reply Frank.
    I saw the link http://sreevardhanadf.blogspot.in/2012/07/showing-next-row-as-current-row-after.html
    However the issue is since I am using custom created tree using POJO tree item (composite object).
    calling myTree.getWrappedData() doesn't gives me a handle to JUCtrlHierBinding and subsequent access to JUCtrlHierNodeBinding.
    my program gives me data like -
    List<MyTreeItem> treeData = (List<MyTreeItem>)treeModel.getWrappedData();
    because my tree model is build using -
    treeModel = new ChildPropertyTreeModel(items, "children");
    where items is List of <MyTreeItem>
    Hence I am unable to get a handle using -
    List nodeParentList = nodeParent .getKeyPath();
    I am programmatically able to invoke the parent node to get the fresh data, only issue is the focus/selection of that node is not happening
    Is there a way around?
    Thanks
    Sachin

  • Delete parent node based on its child node value in XML

    I have an xml like this:
    <UPLOAD_REQUEST>
         <CUSTOMER_DETAIL>
         <NAME>Smith</NAME>
         <AGE>20</AGE>
         <GENDER>M</GENDER>
         </CUSTOMER_DETAIL>
         <CUSTOMER_DETAIL>
         <NAME>Nikita</NAME>
         <AGE>35</AGE>
         <GENDER>F</GENDER>
         </CUSTOMER_DETAIL>
    </UPLOAD_REQUEST>
    I want to delete CUSTOMER_DETAIL node where name = 'nikita' from xml. Also note that there is no identification number for CUSTOMER_DETAIL node.
    I was trying to do it like this:
    UPDATE request_xml
    SET request= deleteXML(request, '/UPLOAD_REQUEST/CUSTOMER_DETAIL')
    WHERE extractvalue(request, '/UPLOAD_REQUEST/CUSTOMER_DETAIL/NAME') = 'Nikita';
    It gives error "*EXTRACTVALUE returns value of only one node*"
    Final output should be
    <UPLOAD_REQUEST>
         <CUSTOMER_DETAIL>
         <NAME>Smith</NAME>
         <AGE>20</AGE>
         <GENDER>M</GENDER>
         </CUSTOMER_DETAIL>
    </UPLOAD_REQUEST>
    Can anyone please help me how to do this?
    Edited by: user10446917 on May 6, 2011 3:38 AM

    Add a predicate in the XPath expression :
    UPDATE request_xml
    SET request = deleteXML(request, '/UPLOAD_REQUEST/CUSTOMER_DETAIL[NAME="Nikita"]')
    ;

  • Parent node showing in schema when child nodes not present

    I had several folks answer my questions on mapping from a flat file to an EDI 835 schema and I am down to just a couple of issues before I finish up. I have a conditional mapping issue that I have to solve before I can map the rest of the document. I am
    mapping three fields in a single non-repeating line in the flat file to a repeating segment in the 835. Basically I need to create a separate AMT_ClaimSupplementalInformation segment for each field in the flat file line. As you can see in the picture
    below I want to create a AMT_ClaimSupplementalInformation segment for CDISCOUNT, CINELIGIBLE and CALLOWED.
    You can see I have quite a bit of conditional logic attached to the three fields, but I have all three connected via a loop to the AMT_ClaimSupplementalInformation parent. I cannot attach the loop to the parent of the three fields because it only appears
    once in the file. And if I leave the loop out the AMT segments get stacked funny, like this:
    <AMT_ClaimSupplementalInformation>
    AMT1
    AMT1
    AMT2
    AMT2
    </AMT_ClaimSupplementalInformation>
    You can see how they should be stacked in the next pic.
    In some cases however, one of those fields may be blank so I will not need to create a AMT_ClaimSupplementalInformation segment for it. I was able to use some conditional mapping ideas you guys gave me using the Not-Equal and Value Mapping functoids, and
    that works great to keep blank child nodes from being created. However, Since I have a loop attached to the AMT_ClaimSupplementalInformation parent node it still creates an empty parent node even when the child nodes are not created. See the empty parent
    node in the pic below.
    Since looping functoids can only be attached to links I don't know how to make the parent node conditional.
    Any suggestions?
    Thanks.

    Boatseller, thanks for the tip. I did end up going the XSLT direction. It's a bit of a hack, but I'm using the following XSLT to eliminate empty nodes :
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <xsl:template match="@*|node()">
            <xsl:if test=". != ''">
                <xsl:copy>
                    <xsl:apply-templates select="@*|node()"/>
                </xsl:copy>
            </xsl:if>
        </xsl:template>
    </xsl:stylesheet>
    I created a new map with the 835 schema on each side. I then created an XSLT file and pointed to it in the Custom XSLT Path property. It seems to work well. I call this map right after my FlatFile_To_835 map.
    I was hoping to use the scripting functoid with inline XSLT in the map so that I didn't have to worry about deploying the XSLT file(just another thing to keep up with in the future), but when I compile it I get the following error:
    The "Scripting" functoid has 1 input parameter(s), but 2 parameter(s) are expected.
    I'm wondering if I'm connecting the schemas incorrectly in the map:
    In any case, I'm past the empty nodes issue for now, which was a big roadblock. Now I have to deal with the CAS segments which are, as you said, a real pain. 
    Thanks for all of your input.

  • Copy values from one Parent node to other Parent Node

    Hi all,
    I have a 2 Parent node each having 3 child nodes. I want to copy the values of all the attributes of all the child nodes of one Parent Node to corresponding other node.
    Both the Parent Nodes as well as their Child Nodes have different name but their attributes have same name.For ex:
    Parent Node -A
    Child Nodes - a, b,c
    Child Node "a" has attributes "x" and "y"
    Parent Node -B
    Child Nodes - d,e,f
    Child Node "d" has attributes "x" and "y" .
    Now I want to copy the values od attributes "x" and "y" from one Parent Node to other Parent node.
    Please help me out.
    Helpful answers will be rewarded.
    Thanxs in advance...

    Hi Jin,
    To use copy service API, u need to satisfy 2 condition for the attributes of source node and target node:
    1. The name of the attribute should be same (including the case of the name)- Abc is different from ABC
    2. Type of the attribute should also be the same.
    copy elements works for copying values from Model node to context and does not work vice-versa. To enable the copying of context node to model node, use copycorresponding API.
    Eg:
    int contextNodeSize = wdContext().node<contextNodeName>().size();
    for(int i = 0; i < contextNodeSize; i++)
         <modelNodeName> modelObject = new <modelNodeName>();
         <contextNodeName>Element contextObject = wdContext().node<contextNodeName>().get<contextNodeName>ElementAt(i);
         WDCopyService.copyCorresponding(contextObject, modelObject);
    This will copy the values from Context Node to Model Node.
    Hope this helps you.
    Regards,
    Poojith MV

  • Filteredtreemodel, how to hide parent nodes if no children

    hi. i have surfed and read a lot of posts and topics here regarding filteredtreemodel. some i found hard to understand so i chose to use NiceGuy1's code from long ago since it's the easiest to understand.
    package test;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.tree.DefaultTreeModel;
    import javax.swing.tree.TreeNode;
    import java.util.ArrayList;
    import java.util.Enumeration;
    public class FilteredTreeModel extends DefaultTreeModel {
        // this hashmap gets the list of pdf files and the filter status
        private String filterText;
        private DefaultMutableTreeNode orig_root;
        public FilteredTreeModel(DefaultMutableTreeNode root) {
            super(root);
            orig_root = root;
        public void setFilterText(String s) {
            this.filterText = s;
            reload();
        public String getFilterText() {
            return this.filterText;
        @Override
        public Object getChild(Object parent, int index) {
            return getFilteredChildren(parent).get(index);
        @Override
        public int getChildCount(Object parent) {
            return getFilteredChildCount(parent);
        @Override
        public int getIndexOfChild(Object parent, Object child) {
            return getFilteredChildren(parent).indexOf(child);
        private int getFilteredChildCount(Object parent) {
            return getFilteredChildren(parent).size();
        private ArrayList<TreeNode> getFilteredChildren(Object parent) {
            ArrayList<TreeNode> filteredChildren = new ArrayList<TreeNode>();
            DefaultMutableTreeNode parentNode = null;
            parentNode = (DefaultMutableTreeNode)parent;
            for (Enumeration e=parentNode.children(); e.hasMoreElements();) {
                DefaultMutableTreeNode nextNode = (DefaultMutableTreeNode) e.nextElement();
                DefaultMutableTreeNode dummy = null;
                  if (nextNode.children().hasMoreElements()) {
                      filteredChildren.add(nextNode);
                } else {
                    // if node is leaf node
                    if (filterText == null ) {
                        // add right away if no filter
                        filteredChildren.add(nextNode);
                    } else {
                        // if filter matches this leaf node, add it. if not, how to check if
                        // parent nodes have empty children and remove it.
            return filteredChildren;
    }i havent had luck the whole day trying to make this work. it seemed that once the filteredChildren.add() is called, it gets rendered to the treecellrenreder right away so if i wnat to remove the parents (in case it has no children based on the filter),the parent nodes will stay put in the jtree. any workaround? or ideas? i dont want to use a different defaulttreemodel for this. i want to avoid that because i have lots of nodes in my jtree.

    Looks like you need this:
    for (Enumeration e=parentNode.getFilteredChildren(); e.hasMoreElements();) Edit: okay, that was just a quick guess. Actually you're going to get into trouble if you try to recursively suppress nodes with no children. First you suppress all the leaf nodes (because they naturally don't have any children). Then you suppress all of their parents, because now they don't have any unsuppressed children. Then you suppress all of the parents' parents, because now they don't have any unsuppressed children... and so on until you only have the root left. So you need to refine that requirement.
    But I get what you're saying. I had to do a similar thing, only I didn't use a FilteredTreeModel, I just built the TreeModel based on a selection from another tree. It's ridiculously hard to do when you don't get the nodes in order from the database, too, but that's a different problem.

  • Getting Parent Node On tree Issue..

    Hi,
    I Have Constructed a Tree and i am Able to get the Details of the clicked Node on the Tree into the Backing Bean.
    But I'm unable to get the Parent Node of the Clicked Child Node.
    Ex:On Click of Employee(Child Node) in the Tree, I should get the Department (Parent Node) in Backing Bean.
    I'm able to get only the details in the same Level of Tree Node(ie All Employees in the Selected Employee Level).
    IDE: JDeveloper 10.1.3.2.
    Please Suggest me.
    Thanking You,
    Bandaru.

    Sounds like you are looking for something like this
    Connected to Oracle Database 11g Enterprise Edition Release 11.1.0.6.0
    SQL> WITH table_1 AS
      2  (SELECT XMLTYPE('<sdi_header>
      3  <Person>
      4  <Customer_First_Name>ABC</Customer_First_Name>
      5  <Customer_Last_Name>DEF</Customer_Last_Name>
      6  </Person>
      7  <warehouse>
      8  <Person>
      9  <Customer_First_Name>XYZ</Customer_First_Name>
    10  <Customer_Last_Name>MNO</Customer_Last_Name>
    11  </Person>
    12  </warehouse>
    13  </sdi_header>') column_name
    14     FROM dual)  -- WITH simulates your table I do not have
    15  select t1.*
    16    from TABLE_1,
    17         XMLTABLE('for $i in /sdi_header//Person
    18                     return <root>
    19                           {$i/Customer_First_Name,
    20                           $i/Customer_Last_Name}
    21                           <parent>{$i/../name()}</parent>
    22                      </root>'
    23                  PASSING table_1.column_name
    24                  COLUMNS
    25                  fname   VARCHAR2(20) PATH 'Customer_First_Name',
    26                  lname   VARCHAR2(20) PATH 'Customer_Last_Name',
    27                  pnode   VARCHAR2(20) PATH 'parent') t1;
    FNAME                LNAME                PNODE
    ABC                  DEF                  sdi_header
    XYZ                  MNO                  warehouseYou can find out how formatted that message by looking in the FAQ in the upper right. It uses the { code } tag (without spaces).

  • Af:tree Master child relation ,but showing child id's as parent node vice

    Hi ,
    Am using adf 11G 11.1.1.5
    I have a small requiement .
    Am using af:tree , where i display childId's . Onclick of child it i have to show popup with tree structure where i will show parentid as node and childId's as child nodes
    i have created view link between child and parent views.
    Now isssue is when i selected childId in table (i mean a checkbox is given where user check the child Id and fire button ).On dat action am calling popup with tree structure .BUT here childId's are displaying like Parent nodes and parentId's as child node.
    any suggestion . if want i will drop the code

    i knew somewhere i was messed up .
    There is only viewlink between, Parent and child .NO FK ,these are not related database table (Entity Object.).
    simple query's which are made from same table , but base on Parent/Root col i have show data in tree structure way.
    Just like
    ParentId Chilld id
    100 jhon
    100 max
    100 adam
    101 jack
    103 jill
    103 marven
    Now it will show in table like
    jhon
    max
    adam
    jack
    jill
    marven
    If i click max i mean check box and fire button , i have to show tree structure like below
    100
    jhon
    max
    adam
    As max parentid is 100 , i have to show all the childid which have 100 as parentid.
    any suggestion plz , me struck here to handel

  • Context Mapping: child-nodes of non-mapped parent nodes

    I am somewhat curious about Context Mapping in WebDynpro.
    Which parents nodes need to be mapped in order to map child nodes ? Does a child node has more than one parent node (e.g. grandparent - two steps above) ?
    A.1  -
    MAPPED----
    >    B.1
      - A1.1   NOT MAPPED
      - A1.2   NOT MAPPED
            - A.1.2.1     MAPPED TO>    B.1.2.4
            - A.1.2.2   NOT MAPPED
      - A1.3   NOT MAPPED
    Is it sufficient that only one of these parent nodes (e.g. direct parent node not mapped, but parent node of this parent node is mapped) need to be mapped so that the child node can be mapped ?
    Is this assumption true or not ?
    The SAP library states:
    "Conversely, child nodes of non-mapped parent nodes cannot be mapped, otherwise this would result in irresolvable conflicts at runtime with respect to the parent-child relation in the context and the mapping relation." (http://help.sap.com/saphelp_nw04/helpdata/de/51/a3384162316532e10000000a1550b0/content.htm)
    This statement is not absolutely clear on this issue.

    Let me put it this way
    You have a node vehicle and you have a child node for that the car. The car node have parameters car1, car2.
    Let the vehicle node have parameters veh1 and veh2
    Then if you map vehicle node one to any other node (say in the comp. controller) you have the option of mapping its children i.e veh1,veh2 and carnode.
    You can have that veh1 is mapped and veh2 is not mapped.
    vehicle node(mapped)
    veh1(may or may not be mapped)
    veh2(may or may not be mapped)
    car node(may or may not be mapped)
    If instead you try to map only the car node the vehicle node will also get mapped automatically but not it's child parameters like veh1 and veh2.
    vehicle node(mapped)
    veh1(may or may not be mapped)
    veh2(may or may not be mapped)
    car nodemapped)
    car1(may or may not be mapped)
    car2(may or may not be mapped)
    Hope this would help.
    Do revert for further clarification
    Regards
    Noufal

  • Runtime ik springs: child nodes break when a parent node is moved

    There is something wrong with IK armature springs when used in runtime mode. Child nodes become disjointed with user interaction of parent nodes.
    Drag spring on right from different points to see bug here: http://gardenofpossibilities.org/flash/ik_spring_runtime_bug/spring_runtimebug.html
    I filed this as a bug, but wanted to mention it here in case others have a similar problem or anyone has a workaround:
    Steps to reproduce bug:
    1. Build simple movieclip based armature
    2. add springs to bones
    3. set armature to runtime and publish
    Results:
    Armature child nodes become disjointed with user interaction of parent nodes. Same disjointed behavior occurs when armature is moved with actionscript 3 ik.mover.
    Expected results:
    Armature nodes should remain properly connected when user or actionscript 3 ik_mover moves any node.
    My Analysis:
    When springs are 0 (no spring) armature works correctly. It appears that the problem is caused by child nodes pivoting at parent node head, when they should actually pivot at parent node tail. Also, when armature becomes disjointed, dragging or moving tail node (furthest from root) restores joints.
    I've posted and example of the bug here: http://gardenofpossibilities.org/flash/ik_spring_runtime_bug/spring_runtimebug.html
    ...and a .zip archive of the fla: http://gardenofpossibilities.org/flash/ik_spring_runtime_bug/
    Please enlighten me on what is wrong, how to fix (if possible). If this is a documented bug, please provide a reference to it.
    Thanks!

    I posted this two months ago. Does anybody have anything to add on this issue? Are there any Adobe programmer/engineers out there? I've even filed a bug report, but have not received any feedback. Not a peep. Please?

  • How To Display  attributes of Child Node and Parent Node in same view

    Suppose I have two view Carview and CarDetail View...IN Component context I have Parent Node Called Cars and It have its attribute as Price,Warranty,Year and also One Child Node Called as Brand Name Whose attribute are PrimaryBrand and SecondaryBrand..Now If I do Mapping of My First View i.e CarView with Child node of BrandName..and then I Have To Show Whole Detail of Car in CarDetailView.......How Can I Achieve it..

    Hi Vinay,
    You can map the child node and even the paren tnode to the same view if u want to display in the same window..
    If not if ur requirment is to dispaly in the sme view but should not map the child and parent to the Same view then you can take another new view.. and insert 2 view containers and then add the Child view and parent view in that view containers and then Diaplay the newly created view.
    Regards,
    Raju Bonagiri

  • Is it possible to put two different colors in tree parent node background and child nodes background?

    Is it possible to put two different colors in tree parent
    node background and child nodes background?
    Any help will be very helpful.
    Thanks

    Hi PanosE,
    Yes, you can set up another Standard Edition Server in child domain and then deploy pool pairing.
    You need to deploy a new Front End Pool for the new Standard Edition Server.
    A similar case for your reference.
    https://social.technet.microsoft.com/Forums/office/en-US/eca4299c-8edb-481e-b328-c7deba2a79ba/lync-2013-standard-edition-lync-fe-pools-in-multiple-domain-single-forest-senario?forum=lyncdeploy
    Best regards,
    Eric
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • DMEE : how to make parent node disappear when child node is empty

    Hi Friends ,
    Currently i am working on DMEE , I have a problem . When Child node is empty I donot want the parent node to appear in the tree.Here I am uisng a field via exit function module for childnode. so not a fpay* strucutre field to write a condition.
    Is there any other way for this ?
    Please help.
    Komaravolu

    I'm not sure if this can be done in DMEE tree, but there is BADI DMEE_BADI_01 that can be implemented to perform any kind of postprocessing right before the file is created. I used it, for example, to replace separators with tabs. I believe this can also be used to eliminate the unneeded nodes.

  • Treeview Add Child to Parent Node Without Creating a New Parent

    I have a treeview setup with a HierarchicalDataTemplate in my XAML as follows:
    <TreeView Grid.Column="1" Grid.Row="0" ItemsSource="{Binding treeViewObsCollection}">
    <TreeView.ItemTemplate>
    <HierarchicalDataTemplate ItemsSource="{Binding mainNodes}">
    <TextBlock Text="{Binding topNodeName}"/>
    <HierarchicalDataTemplate.ItemTemplate>
    <DataTemplate>
    <TextBlock Text="{Binding subItemName}"></TextBlock>
    </DataTemplate>
    </HierarchicalDataTemplate.ItemTemplate>
    </HierarchicalDataTemplate>
    </TreeView.ItemTemplate>
    </TreeView>
    Here is the ViewModel which is set as the Data Context for the XAML File.
    class AdvancedErrorCalculationViewModel : ViewModelBase
    static ObservableCollection<TreeViewClass> _treeViewObsCollection = new ObservableCollection<TreeViewClass>();
    public static ObservableCollection<TreeViewClass> treeViewObsCollection { get { return _treeViewObsCollection; } }
    public class TreeViewClass : ViewModelBase
    public TreeViewClass(string passedTopNodeName)
    topNodeName = passedTopNodeName;
    mainNodes = new ObservableCollection<TreeViewSubItems>();
    public string topNodeName
    get { return this.GetValue<string>(); }
    set { this.SetValue(value); }
    public ObservableCollection<TreeViewSubItems> mainNodes { get; private set; }
    public class TreeViewSubItems : ViewModelBase
    public TreeViewSubItems(string passedSubItemName, string passedSubItemJobStatus)
    subItemName = passedSubItemName;
    subItemJobStatus = passedSubItemJobStatus;
    public string subItemName
    get { return this.GetValue<string>(); }
    set { this.SetValue(value); }
    public string subItemJobStatus
    get { return this.GetValue<string>(); }
    set { this.SetValue(value); }
    public static void AddTreeViewItems(string passedTopNodeName, string passedChildItemName, string passedChildItemJobStatus)
    treeViewObsCollection.Add(new TreeViewClass(passedTopNodeName)
    mainNodes =
    new TreeViewSubItems(passedChildItemName, passedChildItemJobStatus)
    The problem lies with the AddTreeViewItems method
    seen above. Currently, if I call the method by let's say:
    AdvancedErrorCalculationViewModel.AddTreeViewItems("Parent","Child 1", "Completed");
    it creates the parent and child nodes just fine. No issues there.
    However, if I call the method again with the same Parent name but a different Child; for example: 
    AdvancedErrorCalculationViewModel.AddTreeViewItems("Parent","Child 2", "Completed");
    It creates a new Parent node with a child node Child 2 instead. Thus, I have something like this:
    - Parent
    - Child 1
    - Parent
    - Child 2
    I would like to modify this function so that if the parent name is the same, the child node should belong under the previous Parent instead
    of under a new Parent node. Something like this:
    - Parent
    - Child 1
    - Child 2
    Could anyone help me modify my code to detect if the Parent node exists in the observablecollection already and if so, place the child node under the existing parent? The main problem I am facing is trying to add items to a previously created observable collection
    with an existing hierarchy because I don't know how to access the previous observable collection anymore. Help me with this please.
    Thanks in advance. :)

    You need to try and find an existing entry and if it's there add the child to that instead.
    I notice you're  a student and I guess this is probably an assignment.
    By the way.
    I suggest you work on the name of your collections and classes there.
    EG A class should be singular but way more meaningfull than treeviewsubitem.
    Anyhow, finding the top node could be done using linq.  Since you can get none, SingleOrDefault is the method to use.
    Thus something like:
    TreeViewClass tvc = treeViewObsCollection.Where
    (x=>x.Title == passedTopNodeName).SingleOrDefault();
    Will give you tvc null or the qualifying entry.
    If it's null, do what you have now.
    If it's not then add the child item to tvc.
    tvc is a reference to the TreeViewClass you have in that collection.
    Please don't forget to upvote posts which you like and mark those which answer your question.
    My latest Technet article - Dynamic XAML

Maybe you are looking for

  • Create LOVS in jsp with ViewObjects

    Hello, I want to create a jsp-page containing two LOV's (html-<selects>). The first LOV is based on a VO named COUNTRIES. The second LOV is based on a VO named COMPANIES. There's a View Link between the two VO's. I am using the BC4j-Tags from the Com

  • Battery iphone 5 new IOS

    I sold my 3 months old iphone 4s becouse unusual Battery drain:(  got a new iphone 4 and is same..lossing %50 without use infew hours!!! i search and everyone belive is new ios update causing this problem. app store asked me to make a FRESH restore a

  • New message button doesn't work

    Hi, I have rebuild my friends drive with Disk Warrior and now, the Mail software doesn't work well. I cannot create a new message. I tried the "new" button, the "new message" menu in the "File" menu. I even tried to create a new mail by using a link

  • Messages app is not sending alerts in ios 8 is also hanging and crashing very glitchy

    Updated to ios 8 yesterday and noticed that messages were appearing in my messaging app, but no chime or alert badge was appearing.  yes i did check do not disturb, it was off, the sound was on and alerts were also turned on. i've also noticed the me

  • My iphone 4 broken from deleting cydia. Nothing with Internet or recieving texts

    A few months ago i deleted cydia and i must have deleted something by accident. I can no longer recieve texts, factory restore, or do anything that involves internet (besides the app store). It just auto crashes everything. What do i do? I am on a ip