<?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>Re: using substring function</title><link>https://www.infopathdev.com:443/forums/thread/28990.aspx</link><pubDate>Wed, 28 May 2008 15:37:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:28990</guid><dc:creator>stuck</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/28990.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=28990</wfw:commentRss><description>&lt;p&gt;done it.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;used the substring-after to extract everythying after &amp;quot;InProcess\&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;then substring-before to capture everything before the &amp;quot;.pdf&amp;quot; in the previous field.&lt;/p&gt;
&lt;p&gt;it works :-)&lt;/p&gt;</description></item><item><title>Re: using substring function</title><link>https://www.infopathdev.com:443/forums/thread/28982.aspx</link><pubDate>Wed, 28 May 2008 14:18:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:28982</guid><dc:creator>stuck</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/28982.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=28982</wfw:commentRss><description>&lt;p&gt;The structure is somehow standard. &lt;a&gt;\\csdata\DATA_CS\Finance\AccountsPayable\XXX\InProcess\FileName.pdf&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Everything above expect XXX and FileName is variable. Everything else is always the same. So its always the FileName after the InProcess folder that I need to extract.&lt;/p&gt;
&lt;p&gt;would that make it any easier?&lt;/p&gt;</description></item><item><title>Re: using substring function</title><link>https://www.infopathdev.com:443/forums/thread/28981.aspx</link><pubDate>Wed, 28 May 2008 13:59:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:28981</guid><dc:creator>Clay Fox</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/28981.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=28981</wfw:commentRss><description>&lt;p&gt;This would be a lot simpler if their was any standardization or folder name&amp;nbsp; or file name structure that could be keyed upon.&lt;/p&gt;
&lt;p&gt;It may be easier to use code since you could parse it from the right instead, I also believe their are some functions alreay created for parsing file paths to get the specific filename.&lt;/p&gt;
&lt;p&gt;However in InfoPath you can nest Substring functions. But again if their are a variable number of folders this can be tough.&lt;/p&gt;
&lt;p&gt;It might be best to have some extra fields to run this through.&lt;/p&gt;
&lt;p&gt;Set Field1 substring-after(substring-before(Field, &amp;quot;.&amp;quot;), &amp;quot;\\&amp;quot;)&lt;/p&gt;
&lt;p&gt;Set Field2 substring-after(Field1, &amp;quot;\&amp;quot;)&lt;/p&gt;
&lt;p&gt;Conditional Contains(Field2, &amp;quot;\&amp;quot;) set Field3 substring-after(Field2, &amp;quot;\&amp;quot;)&lt;/p&gt;
&lt;p&gt;Conditional Not(Contains(Field2, &amp;quot;\&amp;quot;) set FieldFinal Field2&lt;/p&gt;
&lt;p&gt;Conditional Contains(Field3, &amp;quot;\&amp;quot;) set Field4 substring-after(Field3, &amp;quot;\&amp;quot;)&lt;/p&gt;
&lt;p&gt;You would just need to continue rules on each field for as many as you thought neccessary.&lt;/p&gt;
&lt;p&gt;Not the most elequent but once it is setup would work fine.&lt;/p&gt;</description></item><item><title>using substring function</title><link>https://www.infopathdev.com:443/forums/thread/28980.aspx</link><pubDate>Wed, 28 May 2008 12:30:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:28980</guid><dc:creator>stuck</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/28980.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=28980</wfw:commentRss><description>&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;I want to write a formula to extract a substring from one field in my form to a second field.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;so the first field contains links like: &lt;a&gt;\\server\subdir\subdir\subdir\FileName.pdf&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I want to be able to extract only the last bit just before the last &amp;quot;\&amp;quot; so I will be left with only FileName.pdf in the second field. If I can get rid of the .pdf as well then it would be good but if thats too much work then I&amp;#39;ll be happy with FileName.pdf&lt;/p&gt;
&lt;p&gt;I would be very gratefule for any help.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>