<?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 String Functions in a variable, Subfield, DocumentTitle in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/String-Functions-in-a-variable-Subfield-DocumentTitle/m-p/1877218#M72309</link>
    <description>&lt;P&gt;Hi !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to create a variable with a part of the name of the application.&amp;nbsp; But, the thing is that this function can be replicated in multiple apps, with different names.&lt;/P&gt;
&lt;P&gt;All the apps have something in common, they are all named XXX_XXX_XXX_XXXX_XXXXX&lt;/P&gt;
&lt;P&gt;The X's are different letters (they mean enviorments QA, STAGE, PRD, DATA, STAGE, datasource, tablename, etc).&lt;/P&gt;
&lt;P&gt;The thing is all of strings are separated by "_". And I need always de first 3 strings, as well as the "_".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So if an APP is named:&lt;/P&gt;
&lt;P&gt;QA_DATA_SQL_ACCOUNTS.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need the value QA_DATA_SQL in a variable.&lt;/P&gt;
&lt;P&gt;But I want to copy and paste the variable definition to all my apps, so if I use the variable in another script, where the app is named&lt;/P&gt;
&lt;P&gt;PRD_STG_ORACLE_CUSTOMERS, the output should be "PRD_STG_ORACLE".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I need the first, the second and the third word, and also the delimiter (_).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I though in using FILENAME function and also subfield. But IDK how to use multiple string functions in a variable, like:&lt;/P&gt;
&lt;P&gt;LET S_ENVIORMENT= SUBFIELD(DocumentTitle(),'_',1)&amp;amp;'_'&amp;amp;SUBFIELD(DocumentTitle(),'_',2)&amp;amp;'_'&amp;amp;SUBFIELD(DocumentTItle(),'_',3);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would appreciate some help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 04 Jan 2022 21:34:34 GMT</pubDate>
    <dc:creator>FranciscoQ</dc:creator>
    <dc:date>2022-01-04T21:34:34Z</dc:date>
    <item>
      <title>String Functions in a variable, Subfield, DocumentTitle</title>
      <link>https://community.qlik.com/t5/App-Development/String-Functions-in-a-variable-Subfield-DocumentTitle/m-p/1877218#M72309</link>
      <description>&lt;P&gt;Hi !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to create a variable with a part of the name of the application.&amp;nbsp; But, the thing is that this function can be replicated in multiple apps, with different names.&lt;/P&gt;
&lt;P&gt;All the apps have something in common, they are all named XXX_XXX_XXX_XXXX_XXXXX&lt;/P&gt;
&lt;P&gt;The X's are different letters (they mean enviorments QA, STAGE, PRD, DATA, STAGE, datasource, tablename, etc).&lt;/P&gt;
&lt;P&gt;The thing is all of strings are separated by "_". And I need always de first 3 strings, as well as the "_".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So if an APP is named:&lt;/P&gt;
&lt;P&gt;QA_DATA_SQL_ACCOUNTS.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need the value QA_DATA_SQL in a variable.&lt;/P&gt;
&lt;P&gt;But I want to copy and paste the variable definition to all my apps, so if I use the variable in another script, where the app is named&lt;/P&gt;
&lt;P&gt;PRD_STG_ORACLE_CUSTOMERS, the output should be "PRD_STG_ORACLE".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I need the first, the second and the third word, and also the delimiter (_).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I though in using FILENAME function and also subfield. But IDK how to use multiple string functions in a variable, like:&lt;/P&gt;
&lt;P&gt;LET S_ENVIORMENT= SUBFIELD(DocumentTitle(),'_',1)&amp;amp;'_'&amp;amp;SUBFIELD(DocumentTitle(),'_',2)&amp;amp;'_'&amp;amp;SUBFIELD(DocumentTItle(),'_',3);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would appreciate some help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 21:34:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/String-Functions-in-a-variable-Subfield-DocumentTitle/m-p/1877218#M72309</guid>
      <dc:creator>FranciscoQ</dc:creator>
      <dc:date>2022-01-04T21:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: String Functions in a variable, Subfield, DocumentTitle</title>
      <link>https://community.qlik.com/t5/App-Development/String-Functions-in-a-variable-Subfield-DocumentTitle/m-p/1877238#M72313</link>
      <description>&lt;P&gt;What you posted:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;LET S_ENVIORMENT= SUBFIELD(DocumentTitle(),'_',1)&amp;amp;'_'&amp;amp;SUBFIELD(DocumentTitle(),'_',2)&amp;amp;'_'&amp;amp;SUBFIELD(DocumentTItle(),'_',3);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;looks correct. Does it not work?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;-Rob&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 22:58:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/String-Functions-in-a-variable-Subfield-DocumentTitle/m-p/1877238#M72313</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2022-01-04T22:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: String Functions in a variable, Subfield, DocumentTitle</title>
      <link>https://community.qlik.com/t5/App-Development/String-Functions-in-a-variable-Subfield-DocumentTitle/m-p/1877239#M72314</link>
      <description>&lt;P&gt;I was using Filename in the script instead of document title (like I posted here). So that why it wasn't working.&lt;/P&gt;
&lt;P&gt;It's definitely correct.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 23:11:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/String-Functions-in-a-variable-Subfield-DocumentTitle/m-p/1877239#M72314</guid>
      <dc:creator>FranciscoQ</dc:creator>
      <dc:date>2022-01-04T23:11:12Z</dc:date>
    </item>
  </channel>
</rss>

