Repeating table question - InfoPath Dev
in

InfoPath Dev

Repeating table question

Last post 11-11-2005 01:39 PM by drobins. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-08-2005 12:51 PM

    • drobins
    • Top 500 Contributor
    • Joined on 08-17-2005
    • Canada
    • Posts 47

    Repeating table question

    I have a repeating table for an expense report. After an employee finishes filling out the report they have to select an employee type. Some employees have an additional 25% removed from meals/entertainment expenses.

    So when an employee makes his/her type selection, if they are the type that has the 25% removed, I want to grab all the receipt totals from the repeating table where the expense type equals Meals or Entertainment add them together and then remove 25% from the total.

    Is it possible to do this?

    Any help would be greatly appreciated

    Dave
  • 11-09-2005 12:44 AM In reply to

    Re: Repeating table question

    Hi Dave,
    Sure thing. You can do this with Rules or with Code. For the Rules approach double click on the type selection and go to Rules. Define a rule to set a field's value (in this case the revised total field). Then, you can use XPath to sum the values in your table and multiple by 0.75 or whatever. You may also want to add the same rule to values in the table since they could change after the type is selected.

    For Code, you can add OnAfterChange handlers with code to do the same calculation and set the total fields based on it.

    Hope this helps!

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 11-11-2005 01:39 PM In reply to

    • drobins
    • Top 500 Contributor
    • Joined on 08-17-2005
    • Canada
    • Posts 47

    Re: Repeating table question

    Thanks Patrick,

    What i ended up doing was using a function to total all the taxes from the repeating table "TX" field. I also had to filter that to select all the "TX" field where "EXP_TYP"(expense type field) was equal to meals and entertainment then multiply it by 0.75

    worked out just the way i wanted it to.

    I could then add that to all the rest of the taxes that didn't equal meals or entertainment.

    Dave
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.