Repeating Questions based on Entered Info into a Text Box - InfoPath Dev
in

InfoPath Dev

Repeating Questions based on Entered Info into a Text Box

Last post 02-08-2008 07:35 AM by Clay Fox. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 02-07-2008 09:19 AM

    Repeating Questions based on Entered Info into a Text Box

    I'm new to InfoPath, using 2003, and know nothing about code.  I am trying to get the same set of questions to repeat based on the number of servers the user enters in a text box.  For example, if the users enters that they have 5 servers, then the question set appears 5 times, or it appears 50 times if they enter 50 servers.  Is this possible?  I've tried many times with rules and conditions, but to no avail.  Thanks in advance.

  • 02-07-2008 12:53 PM In reply to

    Re: Repeating Questions based on Entered Info into a Text Box

    Welcome Erik.

    Is this data going to a data base or just staying in the form?

    You would need a field for each question in your repeating node.  Then the user would insert a new section or repeating table for each server until they had cover all of them.  Same result but a slightly different way to get there. Have them insert each one as they need instead of prebuilding a number. They would insert a section or records for each server they have.

    You would need code to insert the number of rows in advance.  I know Greg has some blog posts on doing this here on InfoPathdev.  Unfortunately there is not a method via rules.

  • 02-07-2008 06:19 PM In reply to

    Re: Repeating Questions based on Entered Info into a Text Box

    Another half-baked idea would be to use conditional formatting and only show the user the rows up to the number that is in the field. Add a hidden field called Position to your repeating section and default the value to count(../preceding-sibling:my:Group) + 1. Then, select the row, right click and choose Conditional Formatting. Add a rule that says when Position is greater than the server number field with the action to hide to row. This is half-baked because people could still add rows but they would only see the ones up to the number of servers.

    Patrick Halstead
    Project Manager at Qdabra
  • 02-08-2008 07:10 AM In reply to

    Re: Repeating Questions based on Entered Info into a Text Box

    Thanks guys, I really appreciate the input.

  • 02-08-2008 07:35 AM In reply to

    Re: Repeating Questions based on Entered Info into a Text Box

    I like Patrick's Idea.

     You could make a set of 50 or whatever your maximum was then just show the user the subset that they need.  That may be the easiest way of letting them pre pick a number of sets.

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