<?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: Infopath 2010 - WS.Query property for SQL Select result</title><link>https://www.infopathdev.com:443/forums/thread/100263.aspx</link><pubDate>Mon, 24 Nov 2014 20:26:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:100263</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/100263.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=100263</wfw:commentRss><description>&lt;p&gt;Sorry I didn&amp;#39;t get back to you on the earlier issue - I&amp;#39;ve never seen that dialog before - is the form based off a web service, by chance?&lt;/p&gt;
&lt;p&gt;You have a&amp;nbsp; &amp;quot;&amp;lt;&amp;quot; before your second translate in the formula that is giving you an error, I&amp;#39;d start with that.....&lt;/p&gt;</description></item><item><title>Re: Infopath 2010 - WS.Query property for SQL Select result</title><link>https://www.infopathdev.com:443/forums/thread/100262.aspx</link><pubDate>Mon, 24 Nov 2014 20:14:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:100262</guid><dc:creator>Snowman</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/100262.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=100262</wfw:commentRss><description>&lt;p&gt;Hi Hilary,&lt;/p&gt;&lt;p&gt;I have a different issue I was hoping you could help me with if&amp;nbsp;you get chance.&amp;nbsp; I&amp;#39;m using INFOPATH 2010.&lt;/p&gt;&lt;p&gt;I&amp;#39;m using the formula below; however, getting an      &amp;quot;Expected value type, Actual value: name error&amp;quot;.  Any idea what I am doing wrong? &amp;nbsp;&amp;nbsp; Thank you.&lt;/p&gt;&lt;p&gt;SNOWMAN&amp;nbsp;&lt;/p&gt;&lt;p&gt;concat(substring-before(.,&amp;quot;;&amp;quot;)+substring-after(.,&amp;quot;;&amp;quot;)*((translate(xdDate:AddDays(../my:startDate,substring-before(.,&amp;quot;;&amp;quot;)),&amp;quot;-&amp;quot;,&amp;quot;&amp;quot;)&amp;lt;translate(../my:endDate,&amp;quot;-&amp;quot;,&amp;quot;&amp;quot;))*2-1),&amp;quot;;&amp;quot;,substring-after(.,&amp;quot;;&amp;quot;)div2)&lt;/p&gt;&lt;p&gt;&amp;nbsp;The full formula is:&lt;/p&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoPlainText"&gt;&lt;font size="3" face="Consolas"&gt;startDate rule:&amp;nbsp;&lt;/font&gt;&lt;font size="3" face="Consolas"&gt;condition expession: ../my:endDate != &amp;quot;&amp;quot; &lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;font size="3" face="Consolas"&gt;field: dayDifference &lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;font size="3" face="Consolas"&gt;string value: 0;4096 &lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="3" face="Consolas"&gt;endDate rule: c&lt;/font&gt;&lt;font size="3" face="Consolas"&gt;ondition expession: ../my:startDate != &amp;quot;&amp;quot; &lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;font size="3" face="Consolas"&gt;field: dayDifference &lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;font size="3" face="Consolas"&gt;string value: 0;4096 &lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="3" face="Consolas"&gt;dayDifference rules: &lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;font size="3" face="Consolas"&gt;MainRule: &lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;font size="3" face="Consolas"&gt;condition expession:&lt;/font&gt;&lt;font size="3" face="Consolas"&gt;xdDate:AddDays(../my:startDate, substring-before(.,
&amp;quot;;&amp;quot;)) != ../my:endDate and contains(., &amp;quot;;&amp;quot;) &lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;font size="3" face="Consolas"&gt;field: dayDifference &lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;font size="3" face="Consolas"&gt;xPath expression: concat(substring-before(.,
&amp;quot;;&amp;quot;) + substring-after(., &amp;quot;;&amp;quot;) *
((translate(xdDate:AddDays(../my:startDate, substring-before(.,
&amp;quot;;&amp;quot;)), &amp;quot;-&amp;quot;, &amp;quot;&amp;quot;) &amp;lt; translate(../my:endDate,
&amp;quot;-&amp;quot;, &amp;quot;&amp;quot;)) * 2 – 1), &amp;quot;;&amp;quot;, substring-after(.,
&amp;quot;;&amp;quot;) div 2)&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="3" face="Consolas"&gt;finalize rule: &lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;font size="3" face="Consolas"&gt;condition expession: contains(., &amp;quot;;&amp;quot;) &lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;font size="3" face="Consolas"&gt;field: dayDifference &lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;font size="3" face="Consolas"&gt;xPath expression: substring-before(., &amp;quot;;&amp;quot;)&amp;nbsp;&lt;/font&gt;&lt;/p&gt;</description></item><item><title>Re: Infopath 2010 - WS.Query property for SQL Select result</title><link>https://www.infopathdev.com:443/forums/thread/100178.aspx</link><pubDate>Thu, 20 Nov 2014 14:38:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:100178</guid><dc:creator>janderson021</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/100178.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=100178</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Thank-you very much for the reply.&amp;nbsp; This is the first time I posted on this forum so I am still learning how to use it.&lt;/p&gt;&lt;p&gt;I have attached a screen print of the WS-Query custom control properties, which includes the SQL query.&amp;nbsp; Please let me know if I need to make my dilemma easier to understand.&lt;/p&gt;&lt;span&gt;&lt;p&gt;I need this control to update the field &amp;#39;&lt;b&gt;BFBusinessSegment&lt;/b&gt;&amp;#39; with the results of the query (&lt;strong&gt;Segment&lt;/strong&gt;) whenever the value in field &amp;#39;&lt;b&gt;Profit_Center&lt;/b&gt;&amp;#39; changes.   &lt;/p&gt;&lt;p&gt;This query does not return any results even though the value in &lt;b&gt;&amp;#39;my:Profit_Center&amp;#39;&lt;/b&gt; is valid and has a match in the source table column &lt;b&gt;PRCTR&lt;/b&gt;. &lt;/p&gt;&lt;p&gt;&amp;nbsp; I think (hope) I have not formatted the &lt;b&gt;&amp;#39;[//my:Profit_Center]&amp;#39;&lt;/b&gt; part of the query correctly, and am searching for the correct formatting.&lt;/p&gt;&lt;p&gt;Thanks again for any insight on this, and please let me know if I should post this on a different part of this forum.&lt;/p&gt;&lt;p&gt;Jack&lt;/p&gt;&lt;/span&gt;</description></item><item><title>Re: Infopath 2010 - WS.Query property for SQL Select result</title><link>https://www.infopathdev.com:443/forums/thread/100171.aspx</link><pubDate>Thu, 20 Nov 2014 01:41:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:100171</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/100171.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=100171</wfw:commentRss><description>&lt;p&gt;So - I&amp;#39;m sorry to be confused, but I&amp;#39;m confused. :)&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure what a WS.Query SQL query is? &lt;/p&gt;
&lt;p&gt;If you are trying to set a query field in a custom web service to the select statement in your bullet point, you would want to use a concat formula to include the value from Profit Center:&lt;/p&gt;
&lt;p&gt;concat(&amp;quot;Select distinct etc....&amp;#39;&amp;quot;, &lt;em&gt;&lt;u&gt;my:ProfitCenter&lt;/u&gt;&lt;/em&gt;, &amp;quot;&amp;#39;&amp;quot;)&lt;/p&gt;
&lt;p&gt;Hard to see, but I have some single quotes snuck in there...&lt;/p&gt;
&lt;p&gt;I have a feeling I just don&amp;#39;t understand what you are trying to do tho - so maybe post with a few more details, or attach a sample form under the Options tab.&lt;/p&gt;</description></item><item><title>Infopath 2010 - WS.Query property for SQL Select result</title><link>https://www.infopathdev.com:443/forums/thread/100167.aspx</link><pubDate>Wed, 19 Nov 2014 22:36:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:100167</guid><dc:creator>janderson021</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/100167.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=100167</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hello&amp;nbsp;- relatively new developer in this space, and have a how-to question.&lt;/p&gt;&lt;p&gt;I need to use WS.Query custom control to retrieve a value from a SQL table and populate a field&amp;nbsp;(&lt;strong&gt;FieldB&lt;/strong&gt;)&amp;nbsp;based upon another field&amp;#39;s (&lt;strong&gt;FieldA&lt;/strong&gt;)&amp;nbsp;change in value (Run when field changes).&lt;/p&gt;&lt;p&gt;Both fields are on the same InfoPath Form.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;FieldA&lt;/strong&gt; is populated by a WS.Lookup, and that works as intended.&lt;/p&gt;&lt;p&gt;To populate&amp;nbsp;&lt;strong&gt;FieldB&lt;/strong&gt;&amp;nbsp;I am using a WS.Query SQL query that uses the literal value from&amp;nbsp;&lt;strong&gt;FieldA&lt;/strong&gt; as part of the comparison.&lt;/p&gt;&lt;p&gt;I have tried many different versions of this:&amp;nbsp; It is the below query to get the&amp;nbsp;&lt;strong&gt;Profit_Center&lt;/strong&gt; value (&lt;strong&gt;FieldA)&lt;/strong&gt;&amp;nbsp;that I need to use to return &lt;strong&gt;SEGMENT&lt;/strong&gt; value&amp;nbsp;to &lt;strong&gt;FieldB&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;div&gt;&lt;em&gt;Select distinct Segment from ZCAG_PROFT_CTR_DESC where PRCTR =&lt;strong&gt; &amp;#39;[//my:Profit_Center]&amp;#39;&lt;/strong&gt;&lt;/em&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Is it possible to pull in the literal value of &lt;strong&gt;my:Profit_Center&lt;/strong&gt; (&lt;strong&gt;FieldA)&lt;/strong&gt;within the same form and use like this?&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Any help with this is greatly appreciated.&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Thanks in advance, &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Jack&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>