I am relatively new to Infopath. I tried this post for assistance in this matter several months ago. I was taken off to perform other duties and am now returning to this issue.
Background:
- I am using InfoPath 2007.
- I inherited this form from another developer using InfoPath 2003.
- I am not sure if the form is set up for managed code - how do I check?
- I am not sure if the form is set up as rich client only or browser-compatible (form is submitted to and launched from a SharePoint server) - how do I check?
My challenge:
– Transfer text data entered by a user from the main view of an InfoPath form into a second view (export view) specifically configured for export into Excel. Data exported to Excel must be structured in such a way that the Excel can import directly into a database.
Requirements:
– A user enters information into a text field within a repeating section in the main view that limits text input to 585 characters max.
– This text data must be transferred to the export view into a repeating component (section or table) that allows for separate text fields each having a limit of 65 characters.
I can easiily separate the text from the user's input (using substring) into nine separate text fields (with each text field having a 65 character max to allow for the user's 585 max) within a repeating section in the export view. The problem is with the export into Excel. The data exported into Excel must be structured in a manner that allows for direct import into our database. When separate text fields are used as described above, the data exports 65 characters per cell, all into the same row. I need each of the 65 characters to be input into a cell in successive rows.
If I limit the user's input to 65 characters per text field, require they repeat the section to add more information, and set it up so that the section repeated by the user is automatically repeated in the corresponding section in the export view, the export into Excel is correct. The problem is, this method is too difficult for the user to enter information.
As far as I can determine, each time a section is repeated through clicking on the associated control, the resulting export into Excel is such that each repeating component is assigned to a successive row in Excel. This is exactly what I need to occur.
What I would like to do then is allow for the 585 character max for the user's input of information in the main view, test the length of the input, use substring to separate into 65 character portions, and programmatically repeat a repeating section in the export view to accept each individual character portion.
Basically, how do I programmatically perform the same function as when a user repeats a section by clicking the control that results in creating another repeating section?
Any help I can get will be greatly appreciated!!!!
Best Regards,
jhvrealm