<?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: Trouble with drop downs and auto-populating</title><link>https://www.infopathdev.com:443/forums/thread/6441.aspx</link><pubDate>Thu, 13 Jan 2005 14:27:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6441</guid><dc:creator>ptgrayson</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6441.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6441</wfw:commentRss><description>I got it working.  I just needed to convert the string value to a double value.  Thanks for the help.&lt;br /&gt;&lt;br /&gt;Todd Grayson&lt;br /&gt;US Army&lt;br /&gt;&lt;br /&gt;&lt;blockquote id="quote"&gt;&lt;font size="1" face="Verdana, Arial, Helvetica" id="quote"&gt;quote:&lt;hr height="1" noshade id="quote"&gt;&lt;i&gt;Originally posted by crashoverride&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Does the data need to be converted to a different form before multiplying?&lt;br /&gt;&lt;br /&gt;ex: CInt(data)*num&lt;br /&gt;&lt;hr height="1" noshade id="quote"&gt;&lt;/font id="quote"&gt;&lt;/blockquote id="quote"&gt;</description></item><item><title>Re: Trouble with drop downs and auto-populating</title><link>https://www.infopathdev.com:443/forums/thread/6440.aspx</link><pubDate>Wed, 12 Jan 2005 14:49:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6440</guid><dc:creator>ptgrayson</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6440.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6440</wfw:commentRss><description>The result is stored as double.  The funny thing is that two of the three number work.  Only the last one gets the error.  I thought that it might be reading in the null character at the end of the string, but I am not sure.&lt;br /&gt;&lt;br /&gt;Todd Grayson&lt;br /&gt;US Army&lt;br /&gt;&lt;br /&gt;&lt;blockquote id="quote"&gt;&lt;font size="1" face="Verdana, Arial, Helvetica" id="quote"&gt;quote:&lt;hr height="1" noshade id="quote"&gt;&lt;i&gt;Originally posted by crashoverride&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Does the data need to be converted to a different form before multiplying?&lt;br /&gt;&lt;br /&gt;ex: CInt(data)*num&lt;br /&gt;&lt;hr height="1" noshade id="quote"&gt;&lt;/font id="quote"&gt;&lt;/blockquote id="quote"&gt;</description></item><item><title>Re: Trouble with drop downs and auto-populating</title><link>https://www.infopathdev.com:443/forums/thread/6439.aspx</link><pubDate>Tue, 11 Jan 2005 21:58:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6439</guid><dc:creator>crashoverride</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6439.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6439</wfw:commentRss><description>Does the data need to be converted to a different form before multiplying?&lt;br /&gt;&lt;br /&gt;ex: CInt(data)*num</description></item><item><title>Re: Trouble with drop downs and auto-populating</title><link>https://www.infopathdev.com:443/forums/thread/6438.aspx</link><pubDate>Thu, 06 Jan 2005 21:14:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6438</guid><dc:creator>ptgrayson</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6438.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6438</wfw:commentRss><description>Ok, I got your code working, but now I have a different problem.  One of the auto-populated values gets a NaN error when I try to do a simple multiplication formula.  The other auto-populated numbers multiply just fine.  Any ideas?&lt;br /&gt;&lt;br /&gt;Todd Grayson&lt;br /&gt;US Army&lt;br /&gt;&lt;br /&gt;&lt;blockquote id="quote"&gt;&lt;font size="1" face="Verdana, Arial, Helvetica" id="quote"&gt;quote:&lt;hr height="1" noshade id="quote"&gt;&lt;i&gt;Originally posted by crashoverride&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;I think I may have figured out a solution to the first problem...I use VBScript code to accomplish the task. Basically, the code is written into the OnAfterChange event of the drop down list box, so that it executes/updates every time a change is made to a drop down in any of rows of the repeating table.  I use two data sources: First is the main data source which is where the fields that the controls (the drop down and the text box) bind to are located. Second is a secondary data source which contains the statutes table. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Dim test&lt;br /&gt;Dim i&lt;br /&gt;Dim temp&lt;br /&gt;Dim temp2&lt;br /&gt;Dim queryString&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;'Gets the data for the rows in the repeating table (the repeating table is bound to group2)&lt;br /&gt;&lt;b&gt;set test = XDocument.DOM.selectNodes("/my:myFields/my:group1/my:group2")&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;'the code below loops through each row of the repeating table and for each drop down that is not blank or null, it queries the secondary data source with the offenseID from the drop down and finds the corresponding statute, then puts that statute number into the text box in the form control&lt;br /&gt;&lt;br /&gt;&lt;b&gt;for i=0 to (test.length-1)&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;'get the offense number from the drop down&lt;br /&gt;&lt;b&gt;temp = test.Item(i).getAttribute("my:offense")&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;'make sure the offense isnt blank or null...important!&lt;br /&gt;&lt;b&gt;if (not(IsNull(temp)) and temp&amp;lt;&amp;gt;"") then&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;'build the string which will form the query &lt;br /&gt;&lt;b&gt;queryString = "Select * from StatuteTable where OffenseID=" + temp&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;'query the secondary data source&lt;br /&gt;&lt;b&gt;XDocument.DataObjects("StatuteTable").QueryAdapter.Command=queryString&lt;br /&gt;XDocument.DataObjects("StatuteTable").Query()&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;'get the resulting data from the secondary data source after it has been queried&lt;br /&gt;&lt;b&gt;set temp2 = XDocument.DataObjects("StatuteTable").DOM.getElementsByTagName("d:StatuteTable")&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;'Set the statute field in the main data source to the value found in the secondary data source&lt;br /&gt;&lt;b&gt;test.Item(i).setAttribute "my:StatuteTextBox", temp2.Item(0).getAttribute("StatuteNumber")&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;end if&lt;br /&gt;&lt;br /&gt;next&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;*Note: your XPaths for accessing the data sources may differ depending on how you set up your form (started from scratch, started from a data connection, etc) as well as the differences in how you named your tables and/or fields...if you have any questions, feel free to ask&lt;br /&gt;&lt;br /&gt;&lt;hr height="1" noshade id="quote"&gt;&lt;/font id="quote"&gt;&lt;/blockquote id="quote"&gt;</description></item><item><title>Re: Trouble with drop downs and auto-populating</title><link>https://www.infopathdev.com:443/forums/thread/6437.aspx</link><pubDate>Thu, 30 Dec 2004 21:09:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6437</guid><dc:creator>crashoverride</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6437.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6437</wfw:commentRss><description>I think I may have figured out a solution to the first problem...I use VBScript code to accomplish the task. Basically, the code is written into the OnAfterChange event of the drop down list box, so that it executes/updates every time a change is made to a drop down in any of rows of the repeating table.  I use two data sources: First is the main data source which is where the fields that the controls (the drop down and the text box) bind to are located. Second is a secondary data source which contains the statutes table. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Dim test&lt;br /&gt;Dim i&lt;br /&gt;Dim temp&lt;br /&gt;Dim temp2&lt;br /&gt;Dim queryString&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;'Gets the data for the rows in the repeating table (the repeating table is bound to group2)&lt;br /&gt;&lt;b&gt;set test = XDocument.DOM.selectNodes("/my:myFields/my:group1/my:group2")&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;'the code below loops through each row of the repeating table and for each drop down that is not blank or null, it queries the secondary data source with the offenseID from the drop down and finds the corresponding statute, then puts that statute number into the text box in the form control&lt;br /&gt;&lt;br /&gt;&lt;b&gt;for i=0 to (test.length-1)&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;'get the offense number from the drop down&lt;br /&gt;&lt;b&gt;temp = test.Item(i).getAttribute("my:offense")&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;'make sure the offense isnt blank or null...important!&lt;br /&gt;&lt;b&gt;if (not(IsNull(temp)) and temp&amp;lt;&amp;gt;"") then&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;'build the string which will form the query &lt;br /&gt;&lt;b&gt;queryString = "Select * from StatuteTable where OffenseID=" + temp&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;'query the secondary data source&lt;br /&gt;&lt;b&gt;XDocument.DataObjects("StatuteTable").QueryAdapter.Command=queryString&lt;br /&gt;XDocument.DataObjects("StatuteTable").Query()&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;'get the resulting data from the secondary data source after it has been queried&lt;br /&gt;&lt;b&gt;set temp2 = XDocument.DataObjects("StatuteTable").DOM.getElementsByTagName("d:StatuteTable")&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;'Set the statute field in the main data source to the value found in the secondary data source&lt;br /&gt;&lt;b&gt;test.Item(i).setAttribute "my:StatuteTextBox", temp2.Item(0).getAttribute("StatuteNumber")&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;end if&lt;br /&gt;&lt;br /&gt;next&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;*Note: your XPaths for accessing the data sources may differ depending on how you set up your form (started from scratch, started from a data connection, etc) as well as the differences in how you named your tables and/or fields...if you have any questions, feel free to ask&lt;br /&gt;</description></item><item><title>Re: Trouble with drop downs and auto-populating</title><link>https://www.infopathdev.com:443/forums/thread/6436.aspx</link><pubDate>Wed, 29 Dec 2004 16:46:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6436</guid><dc:creator>ptgrayson</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6436.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6436</wfw:commentRss><description>I am also having the same problem as your first problem.  Hopefully we can get an answer soon from one of the MVP's.&lt;br /&gt;&lt;br /&gt;Todd Grayson&lt;br /&gt;US Army</description></item><item><title>Trouble with drop downs and auto-populating</title><link>https://www.infopathdev.com:443/forums/thread/4518.aspx</link><pubDate>Tue, 07 Dec 2004 22:05:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4518</guid><dc:creator>WHPDSWAT</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4518.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=4518</wfw:commentRss><description>Hello,&lt;br /&gt;I am a police officer with the city of Winter Haven Florida and have been creating our new report writing system with infopath. The project is approximately 90% complete but I am having trouble with some of the advanced features. (or at least advanced for me. &lt;br /&gt;&lt;br /&gt;I don't know what level of assistance I may get but I was hoping that someone may have had the same propblem I'm having and beat it. Any assistance would be greatly appreciated.&lt;br /&gt;&lt;br /&gt;To set the stage the report consists of a main section which is in all reports. Then has multiple optional sections with a repeating section inside of them so the officers can ad as many people, suspects, property, etc as they need to. &lt;br /&gt;&lt;br /&gt;The form is done and works great. However there are a few things that I would realy like to see. &lt;br /&gt;&lt;br /&gt;1. The first problem is I have a repeating table so the officers can list the types of offenses. I have one cell which I have changed to a drop down. it is linked to an access data base which I wrote for the Florida State laws. I wanted a another cell to be automaticly filled with the statute number that matches the offense I have selected. I got it set up and it works following your examples, However it only works for the first selection. When I add a second row sometimes it works correctly sometimes it doesn't. But needless to say once I add the second row any others show the same statute number in the auto-populated cell. This is what steps I took.&lt;br /&gt;&lt;br /&gt;	1. Create the repeating table.&lt;br /&gt;	2. Change one of the fields to a drop down.&lt;br /&gt;	3. Link that drop down to the database.&lt;br /&gt;	4. set a rule to fill the statute number field.&lt;br /&gt;	5. opened the filter and added a filter so the crime = the database name for it.&lt;br /&gt;	   I noted that when I opened the filter there was a long filter there I had to remove that one to get it to work at all.&lt;br /&gt;&lt;br /&gt;it looks like this:   rule1: @statutenum=@statute[description=charge}&lt;br /&gt;                      filter: description=charge&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Can you help?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The second issue is this I have option/repeating sections for listing suspects. I also have optional/repeating section for writing the charging documents. I there a way to get the suspects data to auto populate the fields in the charging document from the suspect section so that the first suspect goes in the first charging document, the second on goes in the second and so on? I could do it with drop down boxes but I would rather have it do it automatically. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Any help in this issue would be great. &lt;br /&gt;&lt;br /&gt;Thanks in advance,&lt;br /&gt;&lt;br /&gt;Ofc. Richard Ganey&lt;br /&gt;Winter Haven Police Department&lt;br /&gt;res072xc@gte.net&lt;br /&gt;863-287-1952&lt;br /&gt;</description></item></channel></rss>