<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: using rtrim to isolate server name in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/using-rtrim-to-isolate-server-name/m-p/939933#M324235</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can pick out the part of the path you want by using SubField()-function. This can be used both in a load script but also in the running application in the UI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SubField( Path , '\' , 3 ) will pick out the server1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the first element is empty... the string starts with a backslash. The second part is empty - since there is nothing between the two first backslashes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also index backwards by using a negative index. So SubField( Path , '\' , -1 ) will give you the text after the last backslash.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Aug 2015 18:04:55 GMT</pubDate>
    <dc:creator>petter</dc:creator>
    <dc:date>2015-08-17T18:04:55Z</dc:date>
    <item>
      <title>using rtrim to isolate server name</title>
      <link>https://community.qlik.com/t5/QlikView/using-rtrim-to-isolate-server-name/m-p/939931#M324233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a server path (or paths) that we want to do selections on the server name only.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&amp;nbsp; \\server1\Folder Path&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var1 - mid(Path, index(Path,'\\', 1) + 2) to remove the first two slashes&lt;/P&gt;&lt;P&gt;var2 - RTrim(Path) - ?? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What's the best way to accomplish removing everything after the slash after server1 and be flexible to handle different string lengths? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 17:53:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-rtrim-to-isolate-server-name/m-p/939931#M324233</guid>
      <dc:creator>ngosz4074</dc:creator>
      <dc:date>2015-08-17T17:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: using rtrim to isolate server name</title>
      <link>https://community.qlik.com/t5/QlikView/using-rtrim-to-isolate-server-name/m-p/939932#M324234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;you can use subfield &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;subfield(mid(Path, index(Path,'\\', 1) + 2) ,'\',1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;you can use subfield for the whole thing &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; line-height: 1.5em;"&gt;subfield(Path,'\',3) if you do not want to use the mid function&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 18:00:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-rtrim-to-isolate-server-name/m-p/939932#M324234</guid>
      <dc:creator>ramoncova06</dc:creator>
      <dc:date>2015-08-17T18:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: using rtrim to isolate server name</title>
      <link>https://community.qlik.com/t5/QlikView/using-rtrim-to-isolate-server-name/m-p/939933#M324235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can pick out the part of the path you want by using SubField()-function. This can be used both in a load script but also in the running application in the UI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SubField( Path , '\' , 3 ) will pick out the server1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the first element is empty... the string starts with a backslash. The second part is empty - since there is nothing between the two first backslashes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also index backwards by using a negative index. So SubField( Path , '\' , -1 ) will give you the text after the last backslash.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 18:04:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-rtrim-to-isolate-server-name/m-p/939933#M324235</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-08-17T18:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: using rtrim to isolate server name</title>
      <link>https://community.qlik.com/t5/QlikView/using-rtrim-to-isolate-server-name/m-p/939934#M324236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;for server1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= subfield(replace('\\server1\Folder Path', '\\', ''), '\', 1)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 18:07:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-rtrim-to-isolate-server-name/m-p/939934#M324236</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-08-17T18:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: using rtrim to isolate server name</title>
      <link>https://community.qlik.com/t5/QlikView/using-rtrim-to-isolate-server-name/m-p/939935#M324237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;folder path&lt;/P&gt;&lt;P&gt;trim(subfield(Replace( '\\server1\Folder Path','\\',''),'\',2))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;server name&lt;/P&gt;&lt;P&gt;subfield(Replace( '\\server1\Folder Path','\\',''),'\',1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hth&lt;/P&gt;&lt;P&gt;Sasi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 19:29:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-rtrim-to-isolate-server-name/m-p/939935#M324237</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2015-08-17T19:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: using rtrim to isolate server name</title>
      <link>https://community.qlik.com/t5/QlikView/using-rtrim-to-isolate-server-name/m-p/939936#M324238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or using Textbetween()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=TextBetween('\\server1\Folder','\\','\')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=TextBetween(path ,'\\','\')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 19:34:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-rtrim-to-isolate-server-name/m-p/939936#M324238</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-08-17T19:34:15Z</dc:date>
    </item>
  </channel>
</rss>

