User enters number of rows needed in repeating table - InfoPath Dev
in

InfoPath Dev

User enters number of rows needed in repeating table

Last post 09-23-2013 11:15 AM by arothacker. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 09-19-2013 12:51 PM

    User enters number of rows needed in repeating table

    Hello-

    Is there a way to have a text box that when the user enters a number...say 15...then 15 rows appear in a repeating table? I have a form where some people will need to enter in 50 or so lines and I'm trying to prevent them from having to click the add button every time.

    Thanks!

  • 09-19-2013 06:15 PM In reply to

    Re: User enters number of rows needed in repeating table

     Hi -

    Unfortunately, this would generally take code (or you could try qRules which can do this sort of thing in a rule-based fashion).

    However, you can alternately include the max number of rows you think the user would ever need by default in your form (Data --> Default Values for IP 2010 and 2013, Tools --> Default Values for IP 2007). Then you just have to conditionally hide the ones the user doesn't want. I'm attaching a simple sample of that - right click the link in the post header and save the file locally. Right click the saved file and select Design to open in design mode - then you can preview and test.

     

    Hilary Stoupa

  • 09-23-2013 08:14 AM In reply to

    Re: User enters number of rows needed in repeating table

    Yeah your file is exactly what I'm looking for! Say the max number a user would need in 300 rows...I can make this my default then when they type in say 100, I could set it up so that the other 200 are hidden? Where can I go in your file to see how you did that? I'm pretty inexperienced in InfoPath unfortunately =/

  • 09-23-2013 08:17 AM In reply to

    Re: User enters number of rows needed in repeating table

     I have conditional formatting set on the repeating table - select it and look at the rules to find the conditional formatting.

    Hilary Stoupa

  • 09-23-2013 08:50 AM In reply to

    Re: User enters number of rows needed in repeating table

    Okay I followed the conditional formatting you have for the table. However, anytime I enter in a number only 1 row appears no matter what the number is. I added the three rules you applied to your table: (field1 = Number and group2 = RepeatingTable)

    Number is Blank = Hide this control

    Expression: count(preceding-sibling::my:RepeatingTable) + 1 > ../../my:Number = Hide this control

    Number is greater than or equal to 300 = hide this control

     Any idea what might be causing this? I can attach a copy if you want.

     

     

  • 09-23-2013 09:15 AM In reply to

    Re: User enters number of rows needed in repeating table

    Yup, attach a copy under Options and I'll take a look.

    Hilary Stoupa

  • 09-23-2013 09:22 AM In reply to

    Re: User enters number of rows needed in repeating table

    Great thanks! Here you go.

  • 09-23-2013 09:27 AM In reply to

    Re: User enters number of rows needed in repeating table

     You need to add additional instances of the repeating group under Default Values - right click the repeating group to get the option to add another. I'm not gonna lie to you - adding 300 of them is going to be pretty tedious and you'll want to make sure your form's performance is still acceptable with all those blank rows.


    Hilary Stoupa

  • 09-23-2013 11:15 AM In reply to

    Re: User enters number of rows needed in repeating table

    Yup that fixed it but I think you're right. There are cells that can't be blank when they are submitted and the total headcount row counts all the rows rather than the one's filled in.

     Ultimately what we want is to have 1 form that multiple users fill out and submit. When the infopath form is submitted it then dumps the data into one central loction such as excel. (Basically like an Access form & table relationship) Therefore once all the submissions are done that are needed we have a consolidated file with everyone's data. Each user will submit a different amount of rows however. For example one person may need to submit 10 rows while another needs to submit 100. My initial thought was to have this form template for each user to fill out and submit to the doc library. Then have them linked (if possible) to a central location where all the data is consolidated and displayed.

     

    If you have any suggestions that'd be awesome! If not, thanks for helping out with this issue I had!

     

     

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