<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Return Master/Detail field values and export to notepad via vbscript</title><link>https://www.infopathdev.com:443/forums/thread/54489.aspx</link><pubDate>Tue, 04 May 2010 11:48:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54489</guid><dc:creator>Tommy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54489.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=54489</wfw:commentRss><description>&lt;p&gt;Hello, I&amp;#39;m not very good at coding and I need help creating a Master/Child form in VBScript in Infopath 2007. I want to create a form where the form grabs all data from a particular field and then export all the combined data to notepad &lt;/p&gt;
&lt;p&gt;Example Form: &lt;/p&gt;
&lt;p&gt;Receipt ID&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Receipt Name&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Receipt Item&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Receipt Price&lt;/p&gt;
&lt;p&gt;BUTTON - Export all prices to notepad&lt;/p&gt;
&lt;p&gt;Once the data is on notepad, the prices from the fields are line by line&lt;br /&gt;2.99&lt;br /&gt;1.00&lt;br /&gt;3.99&lt;br /&gt;Etc...&lt;/p&gt;
&lt;p&gt;The code for my button at the moment:&lt;br /&gt;Sub ExportButton_OnClick(eventObj)&lt;/p&gt;
&lt;p&gt;&amp;#39;Write your code here&lt;br /&gt;‘Declare variables&lt;br /&gt;&amp;nbsp;&amp;nbsp; Dim Oprice, price, fso&lt;br /&gt;&amp;nbsp;&amp;nbsp; Set Oprice= eventObj.Source.selectSingleNode(&amp;quot;//my:Price&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp; price = Oprice.Text &lt;/p&gt;
&lt;p&gt;‘Write to notepad&lt;br /&gt;Set fso = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)&lt;br /&gt;Set NewsFile = fso.CreateTextFile(&amp;quot;C:\PriceList.txt&amp;quot;, True)&lt;br /&gt;NewsFile.WriteLine (price)&lt;br /&gt;NewsFile.Close&lt;br /&gt;End Sub&lt;/p&gt;
&lt;p&gt;It keeps exporting only the first price to notepad. How can I make it so that is can read all the prices that the users enters (the user can enter virtually unlimited data) and then put all that data into notepad line by line.&lt;/p&gt;
&lt;p&gt;I appreciate any help given&lt;/p&gt;</description></item></channel></rss>