Dynamic form - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Dynamic form

Last post 08-25-2013 04:46 PM by Patrick Halstead. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 08-17-2013 04:11 AM

    • wpryan
    • Not Ranked
    • Joined on 08-17-2013
    • Posts 2

    Dynamic form

    Hi All, I'm really, really new to InfoPath... I have experience with MS Access and Excel, writing VBA code to customize and automate tasks as well as conditional formatting, and hope that the transition won't be so difficult. I got the program to develop a service report form, hopefully which will be universal across our product lines. The plan is for it to be an offline form, to be completed at a customer site and then emailed to the home office for import into an Access database. When I say dynamic what I mean is that, although that the tasks to be performed during service of these products will be similar, there will obviously be differences. Therefore the structure of the form may change based on the model selected (fewer, more, or different tasks). I guess what I'd like to know is, can InfoPath handle such a thing and, are there any examples of such a form that I may have a look at to see a general approach to the project. Lastly, because I haven't worked with schema in the past, are there any differences to how an Access database should be structured, in terms of normalization?
  • 08-18-2013 03:38 PM In reply to

    Welcome to the forum!

    I think what you are after is data-driven design.

    InfoPath is an XML editor so it's particularly adept at dealing with dynamic data.

    You just need to create a normalized data source and then add a data connection that pulls the values in and copy those to the main data source.

    Great examples of this technique abound. Surveys, checklists, performance reviews, contracts - you name it - are all great examples of data-driven design.

    For offline forms, there's an added challenge of the data connection since we assume the user is connected.

    One suggestion here would be to store pre-populated XMLs that correspond to the different "models" and then just use SharePoint workspace to synch them down to the laptop. In other words, the form either contains all of the model info included in a secondary data source or you pre-fill some XMLs to have the data and save those for synchronization.

    In the former case, you'll want to create a separate InfoPath config form that edits the model pre-pop info. Easiest solution here is just to save your main form in preview. Use the XML to design a new InfoPath form (Run->InfoPath Designer->Design from XML) and then just drag and drop the entire data source into the view. Use this form to generate the secondary XML that you include in the primary form. 

    Also, for offline, you will need to either email the forms to a central admin or have them submit when they go back online.

    Of course, designing your form from Access will not support this data-driven XML design. Tightly coupling your form to a set of Access tables will complicate the InfoPath data-driven design process. I recommend submitting to a SharePoint (using CAML or qRules) and mapping that list to Access. Of course, you could also use our general DBXL web service to map the form's data to a SQL database and then DTS that to Access.

    A few ideas ...

    Patrick Halstead
    Project Manager at Qdabra
  • 08-19-2013 04:08 AM In reply to

    • wpryan
    • Not Ranked
    • Joined on 08-17-2013
    • Posts 2
    Thanks for your answer. The form wouldn't be designed in Access, they would be imported into Access. I've come to learn that this project is a lot more complex than I bargained for. I thought I'd be able to use my VBA skills to help me along. It appears those are not applicable here. I just bought a book "Step by Step - Using Microsoft Infopath 2010 with Microsoft Sharepoint 2010" which I hope can start me going in the right direction. I started already by importing a Word version of our report into Infopath to start looking at how things are structured. It seems that the individual fields are items which should appear in the tables I would want to import into, and that they can be further put into Groups, which would correspond to the individual tables...? So if I create a Group "Customer", then the controls (fields) in that group should also match what's in my database table right? I also tried to play around with calculated fields, which was something I thought would be pretty straight forward wasn't... I wanted to calculate the average of 4 controls formatted as Double (decimal) and the formula was rejected as invalid - too many arguments. So I can only average 1 control? What's going on with that!
  • 08-25-2013 04:46 PM In reply to

    That's a good book.

    Repeating groups in non-repeating parent groups would correspond to your Access tables.  If you add a repeating section or table from the InfoPath controls, it will automatically create this structure. You can use the average math command to get the average of a field under a repeating group. See attached sample XSN.

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