Similar sections but different data? - InfoPath Dev
in

InfoPath Dev

Similar sections but different data?

Last post 12-14-2009 08:53 AM by Jimmy. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 12-14-2009 07:55 AM

    Similar sections but different data?

    This is probably something simple and obvious but I'm not even sure what this is called in order to search for it. :)

    I'm working on a timesheet form in Infopath.  It covers one week.  The first day I have set up with all the entries and calculations working fine.  Now I'm starting to add the rest of the days.

    Thinking like a programmer, it doesn't make sense to recreate everything for each day of the week.  I don't *think* this is something I should do as repeating sections but I may be wrong.  I thought if I created a new section for each day, I would be able to reuse the same fields in a manner similarly to how I can in repeating sections but then make calculations on them separately by referencing them using the section.

    More specifically, in the section called Sunday there is a repeating section WorkTimeBlocks where staff enter information.  Also in the Sunday section there is the field TotalWorkTime that calculates the total time from the repeated section.  This part works fine.  But it seems like there should be a way to have sections for Monday, Tuesday, etc. that use the same repeating section and TotalWorkTime field without having to create MondayTotalWorkTime, MondayWorkTimeBlocks, and so forth.  I could do it that way but thinking down the line this will make editing the form more time consuming than it seems like it ought to be.

    I'm not sure if I'm explaining this very well but I'd appreciate any ideas or insight.

  • 12-14-2009 08:21 AM In reply to

    Re: Similar sections but different data?

    If you think you'll be making a lot of changes to the form down the road, a repeating section that cannot have items added or removed might be a good solution.  This would allow you to set up the controls just once, and have them work exactly the same way for each workday.  In Tools->Default Values... you will see a dialog that allows you to have the form preset with a certain number of items in a repeating section (seven in this case, naturally).  Care to give that a try?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 12-14-2009 08:34 AM In reply to

    Re: Similar sections but different data?

    Yes, that makes sense.  I'll have to play with this some more but I think you've got me on the right track!

  • 12-14-2009 08:48 AM In reply to

    Re: Similar sections but different data?

    Okay, this definitely seems to be the way to go.  One more question about this: is there a way to make all of those duplicates show up in the design view?

  • 12-14-2009 08:53 AM In reply to

    Re: Similar sections but different data?

    To the best of my knowledge, there isn't.
    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.