Forum Discussion

hkhan's avatar
hkhan
Creator II
4 years ago

Report Query XSLT

Im Trying to do a whereuse on Doc V1 table to get data from a relationship called Req V1 Doc v1 which is linked to another item called Req V1 and then Req V1 is linked to another item via relationship to Verification Record is my script below looks good for report query?

<Item type="Document V1" id="{@id}" action="get" select="id">
    <Relationships>
        <Item type="Req V1 Doc v1" action="get" select="source_id">
            <source_id>
                <Item type="Req V1" action="get" select="state,id">
                    <Relationships>
                        <Item type="Req V1 Verification Record" action="get" select="related_id">
                            <related_id>
                                <Item type="Verification Record" action="get" select="id,state">
                                </Item>
                            </related_id>
                        </Item>
                    </Relationships>
                </Item>
            </source_id>
        </Item>
    </Relationships>
</Item>

3 Replies

  • If I understood your data structure from this query correctly the first "select='source_id'" and "<source_id> should be replaced with "related_id" as in the inner "Relationships" tag.

    • hkhan's avatar
      hkhan
      Creator II

      Thank for the reply the following is the data structure and i want to run the query from doc v1 as can be seen below. the relationship is from req v1 

      • alaxala's avatar
        alaxala
        Creator III

        Try this:

        [embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:50f84b01-eca7-43fe-a6f3-b5c2ca43474a:type=xml&text=%3CItem%20type%3D%27Req%20V1%27%20action%3D%27get%27%20select%3D%27id%27%3E%0D%0A%20%20%3CRelationships%3E%0D%0A%20%20%20%20%3CItem%20action%3D%27get%27%20type%3D%27Req%20V1%20Doc%20v1%27%20select%3D%27related_id%28id%29%27%3E%0D%0A%20%20%20%20%20%20%3Crelated_id%3E%7B%40id%7D%3C%2Frelated_id%3E%0D%0A%20%20%20%20%3C%2FItem%3E%0D%0A%20%20%20%20%3CItem%20action%3D%27get%27%20type%3D%27Req%20V1%20Verification%20Record%27%20select%3D%27related_id%28id%2Cstate%29%27%3E%3C%2FItem%3E%0D%0A%20%20%3C%2FRelationships%3E%0D%0A%3C%2FItem%3E]