Repeating table sum and select from a database - InfoPath Dev
in

InfoPath Dev

Repeating table sum and select from a database

Last post 11-14-2006 02:14 PM by Michael71. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 11-10-2006 08:15 AM

    • Michael71
    • Top 50 Contributor
      Male
    • Joined on 10-07-2006
    • Mclean, Virginia-USA
    • Posts 283

    Repeating table sum and select from a database

    I'm trying to Use a drop down box to select a department, then I want a repeating table below to select just that department monthly expenses and just sum it up from 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:ytdExpenseR (repeating table that sums up the monthlyexpense)
    .......my:ytdCapitalR (repeating table that sums up the monthlyexpense)


    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.

    /myFields/datafields/d:TOSS/employeeDepartment[../@monthlyExpenses = current()/Selection/SelectedemployeeDepartment]
  • 11-10-2006 10:13 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: Repeating table sum and select from a database

    Hi Michael,

    Can you try below two Xpaths:

    /myFields/datafields/d:TOSS/employeeDepartment[../@monthlyExpenses = current()/SelectedemployeeDepartment]

    /myFields/datafields/d:TOSS[@monthlyExpenses = current()/SelectedemployeeDepartment]/employeeDepartment
  • 11-14-2006 07:17 AM In reply to

    • Michael71
    • Top 50 Contributor
      Male
    • Joined on 10-07-2006
    • Mclean, Virginia-USA
    • Posts 283

    Re: Repeating table sum and select from a database

    Shiva,

    I added this Xpath and it filters out everything. I want it to be filtered by the drop down list for that department. If anyone can help, I would greatly be thankful for the help.
  • 11-14-2006 02:14 PM In reply to

    • Michael71
    • Top 50 Contributor
      Male
    • Joined on 10-07-2006
    • Mclean, Virginia-USA
    • Posts 283

    Re: Repeating table sum and select from a database

    Ok. I have it working with rules, but I can't figure out how to make it work. I have sum(monthlyExpenses) as the Xpath.....I need to sum them up by a particular department. Any Ideas please.
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.