Topic
7 replies Latest Post - ‏2012-11-27T08:49:25Z by rhapsodytool
navaneethms
navaneethms
8 Posts
ACCEPTED ANSWER

Pinned topic Filter elements and its children elements

‏2011-10-25T10:41:55Z |
Hello,

How can we precisely get or filter only a children element and its sub elements and generate document from RPE?
In this case from the parent package(Example: Main), if there are many children elements under it (Ex: A1, A2,A3). If we need to
document only A1 element and its children elements (For Ex: its diagrams, componets etc.), How can we achieve this?

Thanks and regards,
Navaneeth MS
Updated on 2012-11-27T08:49:25Z at 2012-11-27T08:49:25Z by rhapsodytool
  • navaneethms
    navaneethms
    8 Posts
    ACCEPTED ANSWER

    Re: Filter elements and its children elements

    ‏2011-11-02T06:52:54Z  in response to navaneethms
    Hello,

    Anybody has any information?
    Any more information is needed for the same issue?
  • Dragos.Cojocari
    Dragos.Cojocari
    1606 Posts
    ACCEPTED ANSWER

    Re: Filter elements and its children elements

    ‏2011-11-02T09:00:45Z  in response to navaneethms
    Hey,

    yes, more information is needed. :) With the current information provide all we could give back is "use filter" which I assume won't help much. Upload here a concrete example of a template and the filter you want to define for it and we'll be in a better position to assist you.

    Regards,
    Dragos

    RPE Actual
  • navaneethms
    navaneethms
    8 Posts
    ACCEPTED ANSWER

    Re: Filter elements and its children elements

    ‏2011-11-11T11:31:50Z  in response to navaneethms
    Hello Dragos,

    Thanks again for replying.
    I attached a model structure's snapshot along with this.
    In that you can see that there are many packages, files etc coming under a parent package "server".
    For example if I want to filter out a package called "chat" and its child elements, how do I need to
    set my filter. My output should contain only the "chat" package and its descendants.

    Do you need any more informations?
  • Dragos.Cojocari
    Dragos.Cojocari
    1606 Posts
    ACCEPTED ANSWER

    Re: Filter elements and its children elements

    ‏2011-11-18T11:36:47Z  in response to navaneethms
    Hey,

    you can add JavaScript filter to the query that gets the packages. The content of the filter would have to look like

    
    name.indexOf( 
    "check") >= 0
    


    where name is the "name' property of the Package type.

    Regards,
    Dragos

    RPE Actual
  • navaneethms
    navaneethms
    8 Posts
    ACCEPTED ANSWER

    Re: Filter elements and its children elements

    ‏2011-11-23T06:43:01Z  in response to navaneethms
    Hello Dragos,

    Does this java filter available for REST data source?
    Because when I try to run the java script for the selected container in template, It was
    giving me error as shown in the attachment. Can you please suggest me where the problem is?

    Thanks

    Navaneeth MS
  • Dragos.Cojocari
    Dragos.Cojocari
    1606 Posts
    ACCEPTED ANSWER

    Re: Filter elements and its children elements

    ‏2011-11-23T09:09:50Z  in response to navaneethms
    The JavaScript filters in RPE are independent of the data source used.

    For your problem it is "indexOf" not "IndexOf". See this for more information on JavaScript in RPE

    Regards,
    Dragos

    RPE Actual
    • rhapsodytool
      rhapsodytool
      4 Posts
      ACCEPTED ANSWER

      Re: Filter elements and its children elements

      ‏2012-11-27T08:49:25Z  in response to Dragos.Cojocari
      hii
      same like above problem i got i tried with the method you provided but ofter generatig iam getting empty document so please can any one explain in detail how to give that method if i want to get one project and its related values from list of projects
      thanks in advance
      Regards
      krishna