<?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: WFA function to extract portions of a fqdn in Active IQ Unified Manager Discussions</title>
    <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-function-to-extract-portions-of-a-fqdn/m-p/5610#M1248</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;thanks for your help. My fault was not to recognize that this is Java. So this is good to know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Jul 2012 05:38:27 GMT</pubDate>
    <dc:creator>skellner</dc:creator>
    <dc:date>2012-07-04T05:38:27Z</dc:date>
    <item>
      <title>WFA function to extract portions of a fqdn</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-function-to-extract-portions-of-a-fqdn/m-p/5596#M1242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I try to create a function to extract a portion of a fqdn. When I try it like this I get an error and don't know why. Maybe someone can help me with this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;def extractPrefixArrayName(array_name,region)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;String hostname = splitByDelimiter(array_name,'\\.',0);&lt;/P&gt;&lt;P&gt;return hostname.Substring(0,1)+hostname.Substring(6,5)+region;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I test it with extractPrefixArrayName("g100bpmc002.g100.intern","d") I get the following error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Error: failed to access property: extractPrefixArrayName("g100bpmc002.g100.intern","d"): [Error: unable to resolve method: java.lang.String.Substring(java.lang.Integer, java.lang.Integer) [arglength=2]]&lt;/P&gt;&lt;P&gt;[Near : {... Unknown ....}]&lt;/P&gt;&lt;P&gt;^&lt;/P&gt;&lt;P&gt;[Line: 1, Column: 0]]&lt;/P&gt;&lt;P&gt;[Near : {... "g100bpmc002.g100.intern","d" ....}]&lt;/P&gt;&lt;P&gt;^&lt;/P&gt;&lt;P&gt;[Line: 1, Column: 0]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2025 06:23:41 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-function-to-extract-portions-of-a-fqdn/m-p/5596#M1242</guid>
      <dc:creator>skellner</dc:creator>
      <dc:date>2025-06-05T06:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: WFA function to extract portions of a fqdn</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-function-to-extract-portions-of-a-fqdn/m-p/5601#M1244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;There are two issues with this function &lt;/P&gt;&lt;P&gt;1) You need to use substring and not Substring&amp;nbsp;&amp;nbsp; -Java is case sensitive&lt;/P&gt;&lt;P&gt;2) you need to do hostname.substring(5,6) and not hostname.substring(6,5) - Otherwise you will get index of bound&lt;/P&gt;&lt;P&gt;The result of the below function will be&lt;/P&gt;&lt;P&gt;Input :extractPrefixArrayName("g100bpmc002.g100.intern","d")&lt;/P&gt;&lt;P&gt;Output :gpd&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;def extractPrefixArrayName(array_name,region)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;String hostname = splitByDelimiter(array_name,'\\.',0);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;return hostname.substring(0,1)+hostname.substring(5,6)+region;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;Note that in your function all positions are hard coded (0,1 and 5,6) ,you assume all host names length are the same -not sure if this is indeed true&lt;/P&gt;&lt;P&gt;Hope it helps &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2012 15:43:11 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-function-to-extract-portions-of-a-fqdn/m-p/5601#M1244</guid>
      <dc:creator>dekel</dc:creator>
      <dc:date>2012-07-02T15:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: WFA function to extract portions of a fqdn</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-function-to-extract-portions-of-a-fqdn/m-p/5610#M1248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;thanks for your help. My fault was not to recognize that this is Java. So this is good to know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2012 05:38:27 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/WFA-function-to-extract-portions-of-a-fqdn/m-p/5610#M1248</guid>
      <dc:creator>skellner</dc:creator>
      <dc:date>2012-07-04T05:38:27Z</dc:date>
    </item>
  </channel>
</rss>

