Support

Expand all | Collapse all

Recursion and Velocity

  • 1.  Recursion and Velocity

    Posted 6 days ago
    Hi,

    Can someone provide a example of how you can achieve recursion within a velocity report please?

    Basically given a document I would like to go back the relationship (upstream) tree until the top if reached, i.e. the document has no further upstream relationships?

    Thanks.

    ------------------------------
    Andy
    ------------------------------


  • 2.  RE: Recursion and Velocity

    Posted 4 days ago
    Andy:

    Hello, nice to hear from you today!

    Have you tried using a macro to do it. You can pass your item and whether you are going upstream or downstream.

    Best,

    ------------------------------
    Chloe Elliott
    Jama Software
    Portland OR
    ------------------------------



  • 3.  RE: Recursion and Velocity

    Posted 4 days ago
      |   view attached
    Hello Chloe,

    Thanks for your reply.  Well, I did look at Macros, unfortunately I think I have exceeded my programming skill level as I could not get them to work.

    Basically I can have a hierarchy of requirements (I've attached a sample)

    So I would be starting with a leaf requirement (R6) and I would need the macro to return R1, R2 as these are essentially the top level parents of R6

    If you could provide an example of how this could be achieved I would be very grateful.

    ------------------------------
    Andy
    ------------------------------



  • 4.  RE: Recursion and Velocity

    Posted 3 days ago
    Hi Andy,

    you could do that also in a loop. Limits the the "recursion depth", but I would see that as a benefit.

    regards
    Harald

    ------------------------------
    Harald Hotz-Behofsits
    Frequentis AG
    ------------------------------



  • 5.  RE: Recursion and Velocity

    Posted 2 days ago
    Hi Andy -
    You could use a macro if you are going to be doing this quite a bit, but often, I just do a loop and pick a high number (like 10) and have it stop at 10 levels, unless there is no relationship before then. I know it's not elegant, but it works.

    ------------------------------
    Shawnna Williams
    Jama Software
    ------------------------------