0

My scenario is as follows:

  • I have a dataview wp which currently displays list items (from ECT).
  • In the DataView wp I filter the data according to a parameter passed in from another wp.

The current list data looks like this:

ID, ParentID, Name        Comments
================================
1   Null      Test        blah
2   1         Test_1      clah
3   1         Test_2      dlah
4   2         Test_1_1    plah
5   4         Test_1_1_1  poo

Currently, the list in the view is filtered as below:

/rsQueryResponse/Row/Rows[@ID=$ParamValue]

What I hope to achieve is that, if an ID of say 1, is passed to the dataview, then it will show comments from all the children also.

Since it does not look like its possible to do any sort of complex data manipulation within the xsl, I thought I'd pick your brains to see if there is any other viable solution.

Thanks,

KS

4
  • Couldn't you just change the internal binding to something like /rsQueryResponse/Row/Rows[@ID=$ParamValue or @ParentID=$ParamValue]? Commented Dec 14, 2012 at 16:33
  • Well that wouldn't work for a hierarchy with more than one level.
    – Perplexed
    Commented Dec 14, 2012 at 16:42
  • Misinterpreted the data. It will need some custom xslt to achieve. You'd need to pass the parameter through a template to get the parent, then keep passing it through another template to build child and grandchildren nodes Commented Dec 14, 2012 at 16:52
  • How do I query the same data from another template - do I just pass the rows - could you possibly provide a small code sample. Thanks!
    – Perplexed
    Commented Dec 14, 2012 at 16:56

1 Answer 1

0

Found that the better way to do this was to do the hierarchy grouping in SQL and then use a Business Data List to display the data with a custom xsl for formatting. The ECT is set up with stored procedures. Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.