Applying values to numerous fields based upon three user inputted fields - InfoPath Dev
in

InfoPath Dev

Applying values to numerous fields based upon three user inputted fields

Last post 02-02-2010 02:50 PM by Ted Fitch. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-20-2010 07:52 AM

    • bcltl
    • Not Ranked
    • Joined on 01-20-2010
    • Posts 1

    Applying values to numerous fields based upon three user inputted fields

    I am new to posting to a forum so let me know if I do anything out of the norm.  I have a challenging project and thought to reach out and see if anyone has a more efficient approach in InfoPath. This is going to be a long post, there is a lot to try and explain.  Project background: The goal of the project is to keep detailed real time tracking of each employee’s schedule in a department to give management a big picture of staffing for a particular week. The project consists of 2 InfoPath forms, 2 Access Databases and an Excel file. The first InfoPath form is only used to collect default profile data from each staff member when they join the department or when something in their profile changes permanently. This default data InfoPath form (form #1) submits to an Access database (DB #1). Then the second InfoPath form (form #2) pulls the default data and then is used by each employee to forecast their schedule for a week in advance. They also can update their schedule real time with edits and re-submittals. These submittals go to Access database (DB #2). Finally, there is an Excel file that is pointed to the database that is used for reporting and charting real time.  The forms, databases and excel file all work perfect together in regards to functionality. Issue: The schedule is tracked in 30 minute increments for 24 hours a day for 7 days (Sun-Sat). This creates a huge amount of fields (336).  Each field is a dropdown list with status category choices. This means an individual has to select a value for each 30 minute field that they work when filling out the default profile (form #1) and then any changes in the weekly form (form #2).  I want to create a method for batch inputting. I have created a test form using an InfoPath form and two Access databases to accomplish this. The form pulls some fake default data from the first database. There are 3 drop down lists (category value, start time and number of hours (input can be up to 11 hours)), check boxes for the day(s) the value(s) apply and a button to apply/initiate the changes. Then fields are populated based on filtering values from the second database for different input scenarios. I did this instead of writing code to account for each of input scenarios and time values. This all works perfectly, however, I will have to create a ridiculous amount of rules and conditions to cover each 30 minute increment for each day of the week. I have two rules for each time slot in my test file attached to the button so I would end up having at least 672 rules. These are necessary so the default values aren’t erased and only new values applied when/if button is pressed, etc. I am not even sure if InfoPath would hold this many rules or if performance would become an issue. Request: Is there a way to write code to apply a value to a field and then more fields that follow in succession in a group to avoid using so many rules/conditions?  E.G.  Category is meal/break, the start time is 12:00, the number of hours is 1.0 hour and Monday is checked. According to this scenario, the fields for Monday 00:00 to 00:30, 00:30 to 01:00 should both receive a value of meal/break.  I tried to map things out the best I could here in text format. I hope it creates a good enough overall picture of things. I can attach the test form and database files for reference, they total a bit over 3 mgs. Let me know if you need more information/clarification. Thanks in advance. 
  • 02-02-2010 02:50 PM In reply to

    Re: Applying values to numerous fields based upon three user inputted fields

    Hi and welcome to the InfoPath Dev forums.

    I think the idea of needing to create 672 rules in InfoPath is going to be a big issue for you.  There is likely to be potential huge performance issues with that many rules not to mention what if you need to change something in each rule?  Debugging will also be very hard potentially.

    I think what you want to do is probably best written in code.  Qdabra does a lot of InfoPath consulting work and I would suggest discussing using one of our InfoPath MVP's to take a look at your form and see what we can do to help you.  Our consulting page is located here: http://www.qdabra.com/en/consulting.aspx

    Ted

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