I want to be able to query a repeating table for a particular row matching a simple dynamic condition. I'm new to XPath so I'm sure this is a dumb question.
Say I have a DataSource like this:
People
- Person
-- Name
-- Email
QueryName
QueryEmail
I want to be able to enter a name into QueryName and have it display the correct Email from the People collection based on Name matching QueryName.
If I'm stupid about it I do this: ../my:People/my:Person/my:Email
But that just always returns the Email value from the first element of the repeating section.
So I start playing with XPath expressions. For example: ../my:People/my:Person[last()]/my:Email returns the Email from the last group in the section.
But how do I do a @ statement? Nothing seems to work. If I try to insert fields in the XPath I get complaints about "node-test expected" unless I strip off the "../" portion, and then nothing happens when I try that.
I obviously have to cut my teeth on this XML stuff a bit more :-) but pointers would be appreciated.