<?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: setting a value based on a date</title><link>https://www.infopathdev.com:443/forums/thread/109230.aspx</link><pubDate>Fri, 20 Jan 2017 21:45:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:109230</guid><dc:creator>welik</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/109230.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=109230</wfw:commentRss><description>Figured it out. I was looking in the wrong place.   Thanks for all your help.</description></item><item><title>Re: setting a value based on a date</title><link>https://www.infopathdev.com:443/forums/thread/109220.aspx</link><pubDate>Fri, 20 Jan 2017 00:08:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:109220</guid><dc:creator>welik</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/109220.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=109220</wfw:commentRss><description>Thank you. I would still like to know how you got the xpath to come up. is the attached image where you clicked?</description></item><item><title>Re: setting a value based on a date</title><link>https://www.infopathdev.com:443/forums/thread/109219.aspx</link><pubDate>Fri, 20 Jan 2017 00:01:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:109219</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/109219.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=109219</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Modify the Rate data connection and select the checkbox to run the query when the form load. Remove the rule from the Date of Travel field that runs the query. The way the form is now, the query will run every time the date changes - that is unnecessary. When I click the Edit XPath checkbox, I get this:&lt;/p&gt;&lt;p&gt;xdXDocument:GetDOM(&amp;quot;Rate&amp;quot;)/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:zu7p[msxsl:string-compare(../d:p9yg, xdXDocument:get-DOM()/my:myFields/my:group2/my:Claimdata/my:Date) &amp;lt;= 0]&lt;/p&gt;&lt;p&gt;Which needs to change to this:&lt;/p&gt;&lt;p&gt;xdXDocument:GetDOM(&amp;quot;Rate&amp;quot;)/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:zu7p[msxsl:string-compare(../d:p9yg, &lt;strong&gt;current()&lt;/strong&gt;) &amp;lt;= 0]&amp;nbsp;&lt;/p&gt;&lt;p&gt;I&amp;#39;ve attached&amp;nbsp;the form w/ that change.&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: setting a value based on a date</title><link>https://www.infopathdev.com:443/forums/thread/109218.aspx</link><pubDate>Thu, 19 Jan 2017 23:49:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:109218</guid><dc:creator>welik</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/109218.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=109218</wfw:commentRss><description>when I put a check in xpath it does not give me anything. I have attached the form to the post. the repeating section is claimdata</description></item><item><title>Re: setting a value based on a date</title><link>https://www.infopathdev.com:443/forums/thread/109217.aspx</link><pubDate>Thu, 19 Jan 2017 23:23:41 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:109217</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/109217.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=109217</wfw:commentRss><description>InfoPath doesn&amp;#39;t have an if / then - but if this is on a field in a repeating table, you may need to use the current function in your formula for the value. In your rule, click on the formula editor for the value. Select the edit XPath checkbox and copy the resulting XPath - paste in a reply &amp;amp; I can help you out. Let me know the name of the repeating group too. :)</description></item><item><title>Re: setting a value based on a date</title><link>https://www.infopathdev.com:443/forums/thread/109216.aspx</link><pubDate>Thu, 19 Jan 2017 23:08:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:109216</guid><dc:creator>welik</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/109216.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=109216</wfw:commentRss><description>Thanks!  That helped a lot. It gives the correct rate based on the date chosen. The only issue I have now is that if I have the field in a repeating section after the first selection the rate remains the same as the first row regardless of the date picked on subsequent rows. Do I need to add another rule or can I do an if then statement? I have not seen that being available on the available functions.</description></item><item><title>Re: setting a value based on a date</title><link>https://www.infopathdev.com:443/forums/thread/109200.aspx</link><pubDate>Thu, 19 Jan 2017 00:25:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:109200</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/109200.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=109200</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Okay, a few things - you have a rule on &amp;quot;Mrate&amp;quot; to set a query field and run a query based on the date? That rule should probably go on the date itself. Second - how many rows do you think you&amp;#39;ll end up having in your list? Probably not a lot, right? I&amp;#39;d just query all the data on load, and then set the rate when the date changes. Here&amp;#39;s a copy of your form back - I disabled your rules and set a rule on the Date field. I kept a rule there to query the data connection - but you could just set that connection to query on load. You need to change the data connection to sort by date desc, so that the nearest date is returned first - and then I think what I have put in place will work. :) Save the form locally, right click, select design to open in InfoPath Designer.&lt;/p&gt;</description></item><item><title>Re: setting a value based on a date</title><link>https://www.infopathdev.com:443/forums/thread/109199.aspx</link><pubDate>Wed, 18 Jan 2017 23:41:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:109199</guid><dc:creator>welik</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/109199.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=109199</wfw:commentRss><description>I have attached the test form that I am using.

Thanks</description></item><item><title>Re: setting a value based on a date</title><link>https://www.infopathdev.com:443/forums/thread/109197.aspx</link><pubDate>Wed, 18 Jan 2017 17:40:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:109197</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/109197.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=109197</wfw:commentRss><description>I think instead of the condition you added to the rule, you need the filter on the data when you set the value. I&amp;#39;ll try to set up a simple sample later today, or attach a copy of your template under the options tab in a reply if you&amp;#39;d like a hand.</description></item><item><title>Re: setting a value based on a date</title><link>https://www.infopathdev.com:443/forums/thread/109196.aspx</link><pubDate>Wed, 18 Jan 2017 17:35:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:109196</guid><dc:creator>welik</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/109196.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=109196</wfw:commentRss><description>Hmm... Not sure what to filter. I have a rule  condition if the date picked for the travel date is less than or eq to the date and time field on the rate list then set a value (I picked rate) but not sure what to filter on. I have filtered on  the ID I have filtered on rate. nothing gets populated in the field.

on the list I have 1/1/2016 (data and time) rate 0.55 ID is 1 and 1/1/2017 0.535 ID is 2</description></item><item><title>Re: setting a value based on a date</title><link>https://www.infopathdev.com:443/forums/thread/109183.aspx</link><pubDate>Tue, 17 Jan 2017 20:02:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:109183</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/109183.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=109183</wfw:commentRss><description>Yeah, I&amp;#39;d use a list. You may be missing adding a filter - when you select the item from the list (secondary data source) there is a &amp;quot;filter data&amp;quot; button that lets you specify how to determine which row to get the data from.</description></item><item><title>setting a value based on a date</title><link>https://www.infopathdev.com:443/forums/thread/109161.aspx</link><pubDate>Sat, 14 Jan 2017 00:36:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:109161</guid><dc:creator>welik</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/109161.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=109161</wfw:commentRss><description>I am new to IP and have been developing a form to calculate mileage claims.

I have a date pick field for the date of travel. A total traveled miles filed, and a rate field that was static with a prepopulated value to calculate how much to claim. This worked fine until the rates needed to be changed on a certain date. Changing the prepopulated value on the form is not feasible when the claims need to be filed with different rates.

I need to be able to change the mileage rate in a field based on a date. i.e 12/1/2016 the rate will be .55 on 1/1/2017 the rate will be .52 etc. I am thought I could do this with a SharePoint list and rules on the form, but I  can only get the rate from the first line on the list.

Is a list the best way to achieve what I am trying to do?</description></item></channel></rss>