Hello,
I have a problem I am hoping someone could provide some guidance on. Let me first begin by providing some background details. I have a SQL database that stores some large datasets of information that will be referenced in an InfoPath form. There will be a table of Categories, and a table of subcategories with its associated data. An administrative user will select a Category, which will then fire a process to obtain all the sub-categories and create separate InfoPath templates with the underlying data for each sub-category attached. The form template and fields will be identical for all generated templates, only the data available in offline mode will be different.
I was thinking to achieve this solution, I would need to create an ASP webpage where the administrative user could select the Category required. My code would then query the SQL database and retrieve all the sub-categories and build distinct XML files for each one. The XML files would then need to be loaded into the InfoPath template as its secondary data source and make it available in offline mode, but it needs to be automated as there could be up to 50 sub-categories in some cases.
What I need to know is, is there a way to automate the process of opening the InfoPath Template, update the Secondary data connection to reference an XML file and then save the new template with a distinct name that reflects the sub-category? The InfoPath template is currently hosted in a Form Library in SharePoint and all submissions from the numerous templates will also be saved to another form library.
I hope my explanation makes sense.
Nash.