Large Survey creation (50+ questions + option buttons), need help on method - InfoPath Dev Sign in | Join | Help in General InfoPath (Entire Site) InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads InfoPath Dev » InfoPath » General » Large Survey creation (50+ questions + option buttons), need help on method Large Survey creation (50+ questions + option buttons), need help on method Last post 11-09-2012 10:57 AM by Nancy Young. 26 replies. Page 2 of 2 (27 items) < Previous 1 2 Sort Posts: Oldest to newest Newest to oldest Previous Next 11-07-2012 08:40 AM In reply to Nancy Young Joined on 09-16-2010 Durango, CO Posts 34 Re: Large Survey creation (50+ questions + option buttons), need help on method Mark as Not AnswerMark as Answer... Reply Contact Ahhh. I see now. I was looking at it so much I missed the "my". Thanks, Hilary, again. You're a wiz. It works like a charm now. Cheers! -Nancy 11-07-2012 08:42 AM In reply to Hilary Stoupa Joined on 06-20-2008 Posts 13,297 Re: Large Survey creation (50+ questions + option buttons), need help on method Mark as Not AnswerMark as Answer... Reply Contact Ah ha! I had the namespace wrong in my first reply - we want "my" not ns1. :) Hilary Stoupa 11-07-2012 08:43 AM In reply to Hilary Stoupa Joined on 06-20-2008 Posts 13,297 Re: Large Survey creation (50+ questions + option buttons), need help on method Mark as Not AnswerMark as Answer... Reply Contact Jinx - we figured it out at the same time - again, I had it wrong in my reply too, didn't even notice it till I compared the XPath side by side. Hilary Stoupa 11-08-2012 12:25 PM In reply to Nancy Young Joined on 09-16-2010 Durango, CO Posts 34 Re: Large Survey creation (50+ questions + option buttons), need help on method Mark as Not AnswerMark as Answer... Reply Contact Hi Hilary, New problem: I've set the number of default instances to 25. There are 9 questions in this particular XML file, so it (successfully) submits 9 questions and 16 blank items. How do I set it to only submit the 9? Thanks again. -Nancy 11-08-2012 12:34 PM In reply to Hilary Stoupa Joined on 06-20-2008 Posts 13,297 Re: Large Survey creation (50+ questions + option buttons), need help on method Mark as Not AnswerMark as Answer... Reply Contact Submits where? Are you also submitting to a SharePoint list or something? Hilary Stoupa 11-08-2012 01:14 PM In reply to Nancy Young Joined on 09-16-2010 Durango, CO Posts 34 Re: Large Survey creation (50+ questions + option buttons), need help on method Mark as Not AnswerMark as Answer... Reply Contact Yes, sorry, you can't read my mind? :)Using QRules SubmitToSharePointList; it's about the 6th project I've used it on and I love it. However, I've got an XML data source that may have up to 25 questions in it (I'm using http://[server]/_vti_bin/owssvr.dll?Cmd=Display&List=[Guid]&XMLDATA=TRUE applied toa view of a list as my dataconnection). -Nancy 11-08-2012 01:40 PM In reply to Hilary Stoupa Joined on 06-20-2008 Posts 13,297 Re: Large Survey creation (50+ questions + option buttons), need help on method Mark as Not AnswerMark as Answer... Reply Contact You can modify the repeating group in the mapping file to include an XPath filter - so if the repeating group is: /my:UATForm/my:QuestionsGroup/my:QuestionsYou would change it to:/my:UATForm/my:QuestionsGroup/my:Questions[my:Question != ""]Make sense? Hilary Stoupa 11-08-2012 01:49 PM In reply to Nancy Young Joined on 09-16-2010 Durango, CO Posts 34 Re: Large Survey creation (50+ questions + option buttons), need help on method Mark as Not AnswerMark as Answer... Reply Contact Yes, but that involves a static xml file, which this isn't. I may just write a workflow that looks at the new item and deletes it forthwith if 2 particular columns are both blank. -Nancy 11-08-2012 02:04 PM In reply to Hilary Stoupa Joined on 06-20-2008 Posts 13,297 Re: Large Survey creation (50+ questions + option buttons), need help on method Mark as Not AnswerMark as Answer... Reply Contact I must be confused. I thought the issue was with SubmitToSharePointList and that your blank questions were being written to the list. What I've suggested would be a change to your mapping that is used for that command that would prevent blank questions from being submitted. Hilary Stoupa 11-08-2012 03:03 PM In reply to Nancy Young Joined on 09-16-2010 Durango, CO Posts 34 Re: Large Survey creation (50+ questions + option buttons), need help on method Mark as Not AnswerMark as Answer... Reply Contact Yep, got that, and I will add that to the static saved xml file if my dynamic XML-fetching experiment doesn't work as well as I hope. My blank questions from the questions list, that are being plugged into the form, are being written to the Responses list. I was hoping to allow additional questions to be added to the questions list after user acceptance testing has commenced. If I have a static xml file, I would have to edit that manually to add the new questions. If I have a dynamic xml file, I can't know ahead of time how many instances of the Questions repeating group I'll need in the form. I guess I can't have it both ways. I was hoping you'd have a magic method. -Nancy 11-08-2012 03:15 PM In reply to Hilary Stoupa Joined on 06-20-2008 Posts 13,297 Re: Large Survey creation (50+ questions + option buttons), need help on method Mark as Not AnswerMark as Answer... Reply Contact I am not explaining at all well.I am simply trying to prevent you from submitting your blank questions in your main data source to your SharePoint List by changing the mapping file (that qRules uses for SubmitToSharePointList) to not include them. I'm not suggesting any modifications to the XML that provides your questions (which is, I think, what you are talking about when you say "static saved xml file").However, since you are using qRules, instead of having 25 instances of the Questions node in your main data source by default, you could just use qRules Insert and add as many as you need. Hilary Stoupa 11-09-2012 10:57 AM In reply to Nancy Young Joined on 09-16-2010 Durango, CO Posts 34 Re: Large Survey creation (50+ questions + option buttons), need help on method Mark as Not AnswerMark as Answer... Reply Contact Ohhhhh, duh. I had the OTHER xml file in my head, not the mapping one, although you did say "mapping" several times. Thanks for your patience. I'm not familiar with qRules Insert. I'll investigate it. Thanks Hilary! -Nancy Page 2 of 2 (27 items) < Previous 1 2 Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.
Ahhh. I see now. I was looking at it so much I missed the "my". Thanks, Hilary, again. You're a wiz. It works like a charm now.
Cheers!
Hi Hilary,
New problem: I've set the number of default instances to 25. There are 9 questions in this particular XML file, so it (successfully) submits 9 questions and 16 blank items. How do I set it to only submit the 9?
Thanks again.
Yes, sorry, you can't read my mind? :)
Using QRules SubmitToSharePointList; it's about the 6th project I've used it on and I love it. However, I've got an XML data source that may have up to 25 questions in it (I'm using http://[server]/_vti_bin/owssvr.dll?Cmd=Display&List=[Guid]&XMLDATA=TRUE applied toa view of a list as my dataconnection).
You can modify the repeating group in the mapping file to include an XPath filter - so if the repeating group is:
/my:UATForm/my:QuestionsGroup/my:Questions
You would change it to:
/my:UATForm/my:QuestionsGroup/my:Questions[my:Question != ""]
Make sense?
Yes, but that involves a static xml file, which this isn't.
I may just write a workflow that looks at the new item and deletes it forthwith if 2 particular columns are both blank.
Yep, got that, and I will add that to the static saved xml file if my dynamic XML-fetching experiment doesn't work as well as I hope.
My blank questions from the questions list, that are being plugged into the form, are being written to the Responses list. I was hoping to allow additional questions to be added to the questions list after user acceptance testing has commenced. If I have a static xml file, I would have to edit that manually to add the new questions. If I have a dynamic xml file, I can't know ahead of time how many instances of the Questions repeating group I'll need in the form. I guess I can't have it both ways.
I was hoping you'd have a magic method.
I am not explaining at all well.
I am simply trying to prevent you from submitting your blank questions in your main data source to your SharePoint List by changing the mapping file (that qRules uses for SubmitToSharePointList) to not include them. I'm not suggesting any modifications to the XML that provides your questions (which is, I think, what you are talking about when you say "static saved xml file").
However, since you are using qRules, instead of having 25 instances of the Questions node in your main data source by default, you could just use qRules Insert and add as many as you need.
Ohhhhh, duh. I had the OTHER xml file in my head, not the mapping one, although you did say "mapping" several times. Thanks for your patience.
I'm not familiar with qRules Insert. I'll investigate it.
Thanks Hilary!