I'm trying to Use a drop down box to select a department, then I want a repeating table below to Filter and sum the monthlyExpenses for only that department which was select from the drop down box above. I've tried this with rules, but I think I'm a little off. If someone can assist me, I will greatly appreciate it. If anyone knows anyway else I can do this, let me know.
Here is my Schema
.myFields
....queryFields
....dataFields
.......d:TOSS
...........employeeDepartment (drop down box with 10 departments)
.......my:ytdTotals (repeating table that sums up the monthlyexpense)
.............ytdExpenses
.............ytdBudgeted
.............ytdVariance
I found that I may have to use current(), but I can't get it to work exactly right. Here is the code that I got so far to put in Xpath. I've tried to put it in the repeating tab le filter under This Expressinon, but it filters everything and the repeating table doesn't show anything. I apreciate the help.
/myFields/datafields/d:TOSS/employeeDepartment[../@monthlyExpenses = current()/Selection/SelectedemployeeDepartment]