<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Drop Down List</title><link>https://www.infopathdev.com:443/forums/thread/8586.aspx</link><pubDate>Tue, 20 Dec 2005 13:58:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8586</guid><dc:creator>nukkumatti</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8586.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8586</wfw:commentRss><description>Ok,&lt;br /&gt;&lt;br /&gt;got it working now. Added an additional node into my xml data source and use the value as a kind of counter value.&lt;br /&gt;Thx again for help Matt.&lt;br /&gt;&lt;br /&gt;Come back to you again at a later point with some more challanging questions :)&lt;br /&gt;&lt;br /&gt;Listen to Motörhead cos they play Rock'n Roll :)</description></item><item><title>Re: Drop Down List</title><link>https://www.infopathdev.com:443/forums/thread/8585.aspx</link><pubDate>Tue, 20 Dec 2005 07:52:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8585</guid><dc:creator>nukkumatti</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8585.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8585</wfw:commentRss><description>Hi again,&lt;br /&gt;&lt;br /&gt;ok i really tried every combination with the textbox fromula but i didn't work. now i am using the OnAfterChangeEvent from the drop down list but unfortunately i always get this error when previewing the form and making a selection from the ddl.&lt;br /&gt;&lt;br /&gt;System.Runtime.InteropServices.COMException&lt;br /&gt;Expected token ']' found 'NAME'.&lt;br /&gt;&lt;br /&gt;/myFields/group1/group2[Value = 24--&amp;gt;hours&amp;lt;--]/DisplayName&lt;br /&gt;   at Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMNode.selectSingleNode(String queryString)&lt;br /&gt;   at Microsoft.Office.Interop.InfoPath.SemiTrust.DOMDocument50Wrapper.selectSingleNode(String queryString)&lt;br /&gt;   at Microsoft.Office.Interop.InfoPath.SemiTrust.DOMDocument50Wrapper.selectSingleNode(String queryString)&lt;br /&gt;   at Quotation_Application_Review.Quotation_Application_Review.ddlRequestType_OnAfterChange(DataDOMEvent e) in c:\documents and settings\jlorig\my documents\visual studio projects\quotation_application review\formcode.cs:line 101&lt;br /&gt;   at Microsoft.Office.Interop.InfoPath.SemiTrust._DataDOMEventSink_SinkHelper.OnAfterChange(DataDOMEvent pDataDOMEvent)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is the code i am using:&lt;br /&gt;&lt;pre&gt;[InfoPathEventHandler(MatchPath="/my:myFields/my:ddlRequestType", EventType=InfoPathEventType.OnAfterChange)]&lt;br /&gt;		public void ddlRequestType_OnAfterChange(DataDOMEvent e)&lt;br /&gt;		{&lt;br /&gt;			// Write code here to restore the global state.&lt;br /&gt;&lt;br /&gt;			&lt;br /&gt;			if (e.IsUndoRedo)&lt;br /&gt;			{&lt;br /&gt;				// An undo or redo operation has occurred and the DOM is read-only.&lt;br /&gt;				return;&lt;br /&gt;			}&lt;br /&gt;			// A field change has occurred and the DOM is writable. Write code here to respond&lt;br /&gt;			// to the changes.&lt;br /&gt;			string val		        = e.Source.text;&lt;br /&gt;			IXMLDOMDocument3 displayName	=	(IXMLDOMDocument3)thisXDocument.GetDOM("requestTypes");&lt;br /&gt;			//displayName.setProperty("SelectionNamespaces", displayName.getProperty("SelectionNamespaces"));&lt;br /&gt;			string displayNameString	=	displayName.selectSingleNode("/myFields/group1/group2[Value = " + val + "]/DisplayName" ).text;&lt;br /&gt;			// set the textbox	&lt;br /&gt;			IXMLDOMNode nodeRequest		=	thisXDocument.DOM.selectSingleNode("my:myFields/my:requestTest");&lt;br /&gt;			&lt;br /&gt;			nodeRequest.text		=	displayNameString;&lt;br /&gt;		}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Can someone help ?&lt;br /&gt;Thx in advance&lt;br /&gt;&lt;br /&gt;Listen to Motörhead cos they play Rock'n Roll :)</description></item><item><title>Re: Drop Down List</title><link>https://www.infopathdev.com:443/forums/thread/8584.aspx</link><pubDate>Mon, 19 Dec 2005 19:09:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8584</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8584.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8584</wfw:commentRss><description>This is weird, I don't know why the XPath function isn't working. I tried several different variations and could not get it to work. Maybe this is a bug, does anyone else know how to do this without using code?&lt;br /&gt;&lt;br /&gt;To do it using code, add the following to the OnAfterChange() event of the drop-down list box:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;	// match condition&lt;br /&gt;	var value = eventObj.Source.text;&lt;br /&gt;	// what we want to put into the text box&lt;br /&gt;	var displayName = XDocument.GetDOM( "NameOfSecondaryDataSource" ).selectSingleNode( "/ns1:myFields/ns1:group1/ns1:group2[ns1:Value = " + value + "]/ns1:DisplayName" ).text;&lt;br /&gt;	// set the textbox	&lt;br /&gt;	XDocument.DOM.selectSingleNode( "/my:myFields/my:TextBoxOnDifferentView" ).text = displayName;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;---------------&lt;br /&gt;Matt Faus&lt;br /&gt;InfoPath Dev Texas&lt;br /&gt;</description></item><item><title>Re: Drop Down List</title><link>https://www.infopathdev.com:443/forums/thread/8583.aspx</link><pubDate>Mon, 19 Dec 2005 16:30:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8583</guid><dc:creator>nukkumatti</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8583.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8583</wfw:commentRss><description>Hi again,&lt;br /&gt;&lt;br /&gt;first of all thank you for help.&lt;br /&gt;i put the formula into my textbox and customized it to my dom. no error message but when previewing the form and selecting something from the ddl nothing appears in my textbox. any further suggetions.&lt;br /&gt;&lt;br /&gt;by the way i almost had the same solution like yours but that part was missing:[ns1:Value = //my:DropDownList].&lt;br /&gt;Do you have a short explanation for me ?&lt;br /&gt;&lt;br /&gt;Thx again in advance&lt;br /&gt;&lt;br /&gt;Listen to Motörhead cos they play Rock'n Roll :)</description></item><item><title>Re: Drop Down List</title><link>https://www.infopathdev.com:443/forums/thread/8582.aspx</link><pubDate>Mon, 19 Dec 2005 16:16:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8582</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8582.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8582</wfw:commentRss><description>The simplest method to accomplish this task would be to utilize the formula box of the text box in your "different View". &lt;br /&gt;&lt;br /&gt;1. Double-click on the text box which you wish to populate with the DisplayName&lt;br /&gt;2. Click on the Fx (function) button in the Default Value section.&lt;br /&gt;3. Check the box labeled Edit XPath (advanced)&lt;br /&gt;4. Replace the contents of the Formula textbox with the following code (be sure to customize for your DOM):&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;xdXDocument:GetDOM("NameOfSecondaryDataSource")/ns1:myFields/ns1:group1/ns1:group2[ns1:Value = //my:DropDownList]/ns1:DisplayName&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;---------------&lt;br /&gt;Matt Faus&lt;br /&gt;InfoPath Dev Texas&lt;br /&gt;</description></item><item><title>Drop Down List</title><link>https://www.infopathdev.com:443/forums/thread/5202.aspx</link><pubDate>Mon, 19 Dec 2005 15:54:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:5202</guid><dc:creator>nukkumatti</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/5202.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=5202</wfw:commentRss><description>Hi Folks,&lt;br /&gt;&lt;br /&gt;i already found some threads about drop down lists here. seems that i am not the only one who has some problems with it. i actually works fine except one thing.&lt;br /&gt;&lt;br /&gt;i used an infopath form with a repeating table to create a datasource. one field is called DisplayName (i.e. Design Layout) and the other Value (i.e. 24 hours). so the structure is:&lt;br /&gt;requestTypes (secondary), myFields, group1, group2,DisplayName - Value&lt;br /&gt;Then in my actual infopath form i used the "look up values in a dataconnetion to..." option. this works and i can see the display names in my drop down list.&lt;br /&gt;&lt;br /&gt;furthermore i have two textboxes. the one is directly bound to the drop down list which shows then the values from each selected DisplayName.&lt;br /&gt;In the other textbox (different View) i would like to show the display names selected in the dropdown list.&lt;br /&gt;First i wanted to solve that with using the OnAfterChange event (c# code) but it seems that the trigger doesn't fire at all (not even with just some sample string) after selecting something form the ddl.&lt;br /&gt;Now i read that i can also use a formula (textbox field) but i don't know what to put in there.&lt;br /&gt;Could somebody please help me out ?&lt;br /&gt;Thx in advance.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Listen to Motörhead cos they play Rock'n Roll :)</description></item></channel></rss>