I have a case called 'Project', which has an 'Indicator' child case. In the indicator details form (which you can access by first selecting a project and then selecting an already registered indicator), you can select which other indicators from the same project the currently selected indicator relates to.
I have a lookup table set up with the following statement:
instance('casedb')/casedb/case[@case_type = 'Indicator'][index/parent=current()/@case_id][@status = 'open']
This, unfortunately, results in a question with no choice values. If I remove the [index/parent=current()/@case_id], it return all open indicator cases, which is not what I want.
I read your question again to make sure I was clear, since I think I mis-interpreted on the first reading.
Are you looking for cases with a "peer" relationship? IE: other indicators which share the same parent as the selected indicator?
If so, instead of searching for cases which index the current case ID (which will give you a list of child cases) you should search for cases which have the same parent id as the current case, which (as outlined on that page) you can retrieve as follows:
@Clayton_Sims
Copying your solution and pasting it throws error with a bit vague error report. If anyone trying this, gets an error, the solution is typing the single quotations marks.
Copy paste will give you- curly quotations ‘’.
Typing will give you straight quotation