Trouble Conditional sums for repeating table - InfoPath Dev
in

InfoPath Dev

Trouble Conditional sums for repeating table

Last post 08-12-2010 07:50 AM by Hilary Stoupa. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 08-10-2010 09:37 AM

    Trouble Conditional sums for repeating table

    Trying to design my first form, an Employee Absence and Holiday Tracker. In summary, in the repeating table, the user enters a date (date picker), selects an Absence Type from a drop-down list, and types the number of "day units" taken (value limited to 1.0 or 0.5 for each date/row). For his post, I'll deal only with Absence Type = "Holiday".

    After the user enters all their holidays taken, a separate table shows Holidays Allotted, Holidays Taken and Holidays Remaining (Holidays Remaining = Holidays Allotted - Holidays Taken).

    It works fine UNTIL another row is added to the Repeating Table, but I don't know how to fix it. I'm confused about when to use expression box and the "X-path" options, so think these might have something to do with the fact that it seems to go into an "endless loop"

    Here's what I've got thus far:

    FIELDS IN THE GROUP CALLED "CALCULATIONS":
    HolidayDaysAllotted         date type: Decimal (double)
    HolidayDaysTaken           data type: Decimal (double) ; Default value: sum(DaysTaken) ; Update value
                                          rule: AbsenceTypeIsHoliday(AbsenceType = "Holiday")
    HolidayDaysRemaining    data type: Decimal (double ; Default value: sum(HolidayAllocated) - HolidayDaysTaken ; update T

    RELEVANT FIELDS IN THE GROUP CALLED "REPEATING TABLE", SUBGROUP "ABSENCE DETAILS"
    Date                               date picker
    AbsenceType                  Text (string) ; List box entries (Holiday, Sick, Comp)
    DaysTaken                      Decimal (double)

    If I can just get a handle on this, I think I can figure out the rest. Can someone help?

  • 08-10-2010 03:40 PM In reply to

    Re: Trouble Conditional sums for repeating table

    Hey, do you mind attaching a sample form? You can do that under the options tab. I'm having a little trouble understanding what you are trying to do and what issue you are encountering....

    Hilary Stoupa

  • 08-12-2010 03:03 AM In reply to

    Re: Trouble Conditional sums for repeating table

    Thanks for responding, Hilary. Since posting my question I downloaded Office 2010 and it was much easier to figure out how to do the conditional sums. However, I do have another question that's popped up. The instructions in Help are really useless, and there isn't much available on the internet about Infopath that is geared toward newbies and non-programmers! Step-by-step guides are sorely lacking. I eventually want to learn how to programme the forms, but first have to figure out how to do the basic stuff!

    How do you insert a conditional section. In my case, I have a repeating table with a column containing a drop-down list called "Absence Type". If the user selects "Extended" (where value = "E"), I want an optional section to display where the user fills in details. I want the option to show or hide that section.

    I started by first creating the optional section. I found a video tutorial on the internet for doing this, but it's for the 2007 version and those commands aren't in 2010 - or at least I can't find them (2007 version says something about conditional formatting - but where is that command now?).

    Step-by-step help to insert a conditional section would be gratefully received!

    Filed under:
  • 08-12-2010 07:50 AM In reply to

    Re: Trouble Conditional sums for repeating table

    I wouldn't use an optional section for this, but a regular section.

    Add the section to your form. You are using IP 2010, so the conditional formatting is now under rules -- select your section, then select Manage Rules from the home tab. Add a new formatting rule that hides the section if your field does not = 'E'. See attached sample -- right click the link in the post header then save as to save to your machine. Right click the saved file and select 'design' to open in design mode so you can preview.

    Hilary Stoupa

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