<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Unpopulating a Dropdown list's final selection</title><link>https://www.infopathdev.com:443/forums/thread/22211.aspx</link><pubDate>Wed, 08 Aug 2007 14:15:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:22211</guid><dc:creator>Aye Caramba</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/22211.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=22211</wfw:commentRss><description>&lt;p&gt;Hi Patrick - thanks a lot for your response.&lt;/p&gt;&lt;p&gt;Your 1st option worked - however, when I choose just one value, the dropdown box disappears.&amp;nbsp; I need it to be able to let me choose other values (if need be).&amp;nbsp; You mentioned that I can add a button to show the control again (I assume to show the dropdown box again??).&amp;nbsp; How do I do that?&amp;nbsp; I see that in the controls there is the button control, but it does nothing?&lt;/p&gt;&lt;p&gt;Your 2nd option I&amp;#39;d rather not do - I might just mess something up inside that Script Editor (and because I do not write code, everytime I go in there it just looks like mumbo jumbo to me).&lt;/p&gt;&lt;p&gt;&amp;nbsp;Any help with that button issue would be greatly appreciated.&amp;nbsp; thanks again&lt;/p&gt;&lt;p&gt;Aye&lt;/p&gt;</description></item><item><title>Re: Unpopulating a Dropdown list's final selection</title><link>https://www.infopathdev.com:443/forums/thread/22205.aspx</link><pubDate>Wed, 08 Aug 2007 02:23:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:22205</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/22205.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=22205</wfw:commentRss><description>&lt;p&gt;Hi Aye,&lt;/p&gt;&lt;p&gt;Couple simple options:&lt;/p&gt;&lt;ol start="1"&gt;&lt;li&gt;Hide the dropdown&amp;nbsp;if the value is set. Add a condition to hide the control if it is not blank - this is really easy.&amp;nbsp;You can add a button to show the control again if they have to select it.&lt;/li&gt;&lt;li&gt;Set the value in the dropdown to &amp;quot;&amp;quot; at end of your OnAfterChange routine *and* make sure to add code to the top of the function to exit if the value is blank (so that the other field isn&amp;#39;t blanked by the last set).&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Hope that does the trick!&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Unpopulating a Dropdown list's final selection</title><link>https://www.infopathdev.com:443/forums/thread/22194.aspx</link><pubDate>Tue, 07 Aug 2007 17:23:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:22194</guid><dc:creator>Aye Caramba</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/22194.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=22194</wfw:commentRss><description>&lt;p&gt;Hey nuk -&lt;/p&gt;&lt;p&gt;1.&amp;nbsp;&amp;nbsp;&lt;em&gt;&amp;quot;do you use a multi selectable dropdown list ?&amp;quot;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;I don&amp;#39;t even know what that is.&amp;nbsp; I have a list of names (about 100) that are located in a separate xml document.&amp;nbsp; When you click on the down arrow of the dropdown box, you can choose as many names as you want.&amp;nbsp; The code I gave above does two things:&amp;nbsp; a) it put&amp;#39;s the values in a rich text box (and doesn&amp;#39;t underline them :) ), and b) it lists them in a sentence structure, such as..... XXXXXXXX , XXXXXXXXX, XXXXXXXXX, versus&lt;/p&gt;&lt;p&gt;XXXXXXX&lt;/p&gt;&lt;p&gt;XXXXXXX&lt;/p&gt;&lt;p&gt;XXXXXXX&lt;/p&gt;&lt;p&gt;It works quite well&lt;/p&gt;&lt;p&gt;2.&amp;nbsp; &lt;em&gt;&amp;quot;an idea would be that in you onafterchange event use a stringbuilder to concat all you selected values and then on step before writing it into your richtext box cut the last value of the stringbuilder object. you could propably also use just a string, use a delimiter between the different selected values (e.g. &amp;quot;-&amp;quot;) and then write something like stringForRichTextBox = mystring.substring(0,mystring.lastindexOf(&amp;quot;-&amp;quot;)).&amp;quot;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;Unfortunately, I do not write script.&amp;nbsp; The one that I showed in my first post was written by someone on this board.&amp;nbsp; And that script works well - it&amp;#39;s just that the last chosen value in the dropdown box is shown IN the dropdown box, while it also populates the rich-text box - so in effect, it shows it twice on my form.&lt;/p&gt;&lt;p&gt;3.&amp;nbsp; &lt;em&gt;&amp;quot;just a little point on the side i would always use some meaningful names for my controls/nodes because sooner or later it will drive you crazy to work with fieldnames like field17934. does&amp;nbsp;it make any sense ?&amp;quot;&lt;/em&gt; &lt;/p&gt;&lt;p&gt;Yeah, it makes complete sense? I hear ya bro&amp;nbsp;- I should definately change my control names.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Let me know if that makes it more clearer.&amp;nbsp; Thanks a lot&lt;/p&gt;&lt;p&gt;And Rock On!&lt;/p&gt;</description></item><item><title>Re: Unpopulating a Dropdown list's final selection</title><link>https://www.infopathdev.com:443/forums/thread/22187.aspx</link><pubDate>Tue, 07 Aug 2007 13:32:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:22187</guid><dc:creator>nukkumatti</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/22187.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=22187</wfw:commentRss><description>hi. do you use a multi selectable dropdown list ? not to sure if i really understand your issue but an idea would be that in you onafterchange event use a stringbuilder to concat all you selected values and then on step before writing it into your richtext box cut the last value of the stringbuilder object. you could propably also use just a string, use a delimiter between the different selected values (e.g. &amp;quot;-&amp;quot;) and then write something like stringForRichTextBox = mystring.substring(0,mystring.lastindexOf(&amp;quot;-&amp;quot;)). just a little point on the side i would always use some meaningful names for my controls/nodes because sooner or later it will drive you crazy to work with fieldnames like field17934. does&amp;nbsp;it make any sense ?</description></item><item><title>Unpopulating a Dropdown list's final selection</title><link>https://www.infopathdev.com:443/forums/thread/22183.aspx</link><pubDate>Tue, 07 Aug 2007 12:06:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:22183</guid><dc:creator>Aye Caramba</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/22183.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=22183</wfw:commentRss><description>&lt;p&gt;&lt;strong&gt;Hi guys - hope you can help me out with some codes.&amp;nbsp; Here&amp;#39;s the situation.&amp;nbsp; I have a dropdown box and it&amp;#39;s list box entries are stored in a separate document.&amp;nbsp; I have it set up so that when I choose a value (or multiple values), those values populate in a rich-text box (this works perfectly).&amp;nbsp; That is accomplished by the Data Validation button, then choosing events, OnAfterChange, and then clicking on edit.&amp;nbsp; This is the code that is being used (it looks different in the Script Editor window, but I think you get my point):&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;function msoxd_my_field160::OnAfterChange(eventObj) { // Write code here to restore the global state. if (eventObj.IsUndoRedo) { // An undo or redo operation has occurred and the DOM is read-only. return; } // A field change has occurred and the DOM is writable. Write code here to respond to the changes. if(eventObj.Operation == &amp;quot;Insert&amp;quot;) { var objField161 = XDocument.DOM.selectSingleNode(&amp;quot;//my:myFields/my:field161&amp;quot;); if(objField161.text == &amp;quot;&amp;quot;) { objField161.text = eventObj.Site.text; } else { objField161.text = objField161.text + &amp;quot;, &amp;quot; + eventObj.Site.text; } objField161 = null; }&lt;/p&gt;&lt;p&gt;&lt;strong&gt;What is happening is that when you&amp;#39;re in the form and have chosen your value, it&amp;#39;s populated in the rich-text box, which is exactly what I want&amp;nbsp;it to do; however, the last value chosen is still ALSO populated in the drop-down&amp;nbsp;box.&amp;nbsp; So in effect, it shows up twice.&amp;nbsp; The&amp;nbsp;way I have been able to NOT have the drop down box show the last value chosen is by selecting the very first value in the box, which is blank.&amp;nbsp; There&amp;#39;s got to&amp;nbsp;be a way to&amp;nbsp;tell it that once you tab out of the box, it should NOT show the last value.&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Does that make sense?&amp;nbsp; Any help with this issue would be greatly appreciated.&lt;/strong&gt;&lt;/p&gt;</description></item></channel></rss>