Any way to add paste multiple row data into an InfoPath repeating table? - InfoPath Dev
in

InfoPath Dev

Any way to add paste multiple row data into an InfoPath repeating table?

Last post 11-06-2009 03:40 PM by Greg Collins. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 10-22-2009 03:30 PM

    • vcohen
    • Not Ranked
    • Joined on 10-20-2009
    • Posts 4

    Any way to add paste multiple row data into an InfoPath repeating table?

    My users use Excel to come up with some ad-hoc lists of buildings we own. I'm building an InfoPath form to manage contracts on those buildings. I'm looking for a way to let my users specify the buildings they need in Excel, and paste that list into the InfoPath form Repeating Table control.

    The table has multiple fields; the users would select the Building ID column in their spreadsheet, paste it into the Building ID field in the Repeating Table, and then the InfoPath form would look up the remaining building info from the datasource bound to the control, using the Building ID as the key.

    The Repeating Table lookup part is currently working: the user can enter (by typing or pasting from Excel) a single Building ID, hit Tab, and the table looks up the rest of the info. Then they can insert a new row, and enter the second building ID, lather, rinse, repeat. This is fine for a handful of buildings -- but not for dozens or hundreds. So I'm looking for a way to let them paste in a list, and fill out the table from there.

    If they can't paste directly into a Repeating Table, could I have them paste into a multiline Text control, and then parse that with an XPath expression? What would that XPath look like? One final limitation: no code-behind C# or VB -- we've decided for the moment that the logistics of deploying forms with code-behinds is too much for the current project.

    Any help appreciated...

    Filed under: ,
  • 10-28-2009 09:38 AM In reply to

    Re: Any way to add paste multiple row data into an InfoPath repeating table?

    There's not direct way to do this--partly because you cannot insert new rows without code. Now you could do this with Qdabra qRules, which doesn't require you to write code, but does USE code (C#) to accomplish what it does. You can copy multiple rows from Excel and paste them into a text box, which the code would then parse, adding rows and populating IDs. However, this doesn't work without setting the text box to allow Multi-Line. Pasting multiple rows from Excel does not create any kind of separator between the values unless you have multi-line turned on, then it adds a newline between values.

    One other option is to have the Excel columns match the InfoPath columns. Then the user can insert the correct number of rows, select the table in Excel and paste it directly into the InfoPath table (provided it is a repeating table and not a repeating section, and you are in the rich client and not the web client).

    There are ways around, but it doesn't sound like any are good matches for your scenario.

  • 10-28-2009 10:19 AM In reply to

    • vcohen
    • Not Ranked
    • Joined on 10-20-2009
    • Posts 4

    Re: Any way to add paste multiple row data into an InfoPath repeating table?

    Thanks for the info -- I was afraid of that. I'll have to see if we're as opposed to deploying 3rd-party code modules as we are to developing & deploying our own; I suspect we are.

    I was hopeful about your Excel technique -- it doesn't seem unreasonable to ask users to insert the appropriate number of empty rows, and to structure the repeating table & spreadsheet so the columns match -- until I go to the end of the sentence and see it doesn't work on the Web. Arg!

    Oh, well, time to think about alternate approaches. Thanks for confirming!

    - Val

  • 11-06-2009 03:40 PM In reply to

    Re: Any way to add paste multiple row data into an InfoPath repeating table?

    Glad to help. Sorry I couldn't offer a more useful solution.

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