Limit rows in a DataView to those used in a relation with RowFilter?

F

Flint ZA

I have a simple DataSet with two tables, ParentTbl and ChildTbl. They
each have a ChildId column. They are joined by a relation
ParentTbl_ChildId which associates the ChildId column with ParentTbl
as the parent and ChildTbl as the child. This DataSet is not based on
a database (it is saved to and loaded from XML files) so SQL queries
are not an option.
I need a DataView on ChildTbl which is limited to those rows involved
in a ParentTbl_ChildId relation. I have been trying to achieve this
with the RowFilter property, but have been struggling to define the
appropriate expression. Some of the variations I have attempted are:

m_filteredView->RowFilter = L"NOT(NULL =
(Parent(ParentTbl_ChildId1).ChildId1))"; //The view just ends up being
empty

m_filteredView->RowFilter =
L"Count(Parent(ParentTbl_ChildId1).ChildId) > 0"; // Throws
SyntaxErrorException with "Syntax error in aggregate argument:
Expecting a single column argument with possible 'Child' qualifier."

m_filteredView->RowFilter = L"ChildId
IN(Parent(ParentTbl_ChildId1).ChildId1)"; //Throws EvaluateException
with "Only constant expressions are allowed in the expression list for
the IN operator."

Is this even possible? Can anyone suggest an expression that might
work?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top