<?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: Why does this expression work in one instance and not the other? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Why-does-this-expression-work-in-one-instance-and-not-the-other/m-p/515934#M1124875</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christopher,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried your solution too but not working don't know why, Interested to see if possible can you attach a sample will be helpful just make some changes with the demo App you already shared &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers!!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Dec 2013 08:38:42 GMT</pubDate>
    <dc:creator>qlikpahadi07</dc:creator>
    <dc:date>2013-12-24T08:38:42Z</dc:date>
    <item>
      <title>Why does this expression work in one instance and not the other?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-expression-work-in-one-instance-and-not-the-other/m-p/515926#M1124867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am rather new to Qlikview and have figured out a number of techniques along the road, but I have been struggling with what I thought was a rather simple expression for two days now, and I am hoping someone can help me understand why this is not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A little background:&lt;/P&gt;&lt;P&gt;I have a document with approximately 150 fields (some of which are not well-named for the end users.&amp;nbsp; To help manage the field labels, I created an Excel file with all 150 field names, and a corresponding Field-Alias that I load as part of the script ... the field aliases are then used on my listboxes and chart columns using the following syntax:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Only({&amp;lt;MapThisField={$(=GetCurrentField(cycl_DigitalAnalysis0))}&amp;gt;} FldAlias_B)&lt;/P&gt;&lt;P&gt;...on this one I have a cyclic field that has 8 items in it .... 7 of them are other fields and 1 is an expression.&amp;nbsp; And I get the field alias as expected for the 7 real fields, but my struggle surrounds the expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression starts with the term "=if(" so I thought I could test like this to handle that exception:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(GetCurrentField(cycl_DigitalAnalysis0) LIKE '*=if(*', 'Site/Product', '~OTHER~')&lt;/P&gt;&lt;P&gt;...and it works Great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So why can't I get this to work?&lt;/P&gt;&lt;P&gt;=if(GetCurrentField(cycl_DigitalAnalysis0) LIKE '*=if(*', 'Site/Product', Only({&amp;lt;MapThisField={$(=GetCurrentField(cycl_DigitalAnalysis0))}&amp;gt;} FldAlias_B) )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried various ways of testing for NULL and nothing I do seems to provide me with a solution.&amp;nbsp; Even in the latter expression, it works just fine for the 7 real fields, but I continue to get "-" for that 8th field/expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why?&amp;nbsp; Can anyone help me understand this?&amp;nbsp; If samples 1 and 2 above work fine, why wouldn't #3?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now I do not have a trimmed-down example document I could share, but if it becomes necessary, I can mock something up and post it.&amp;nbsp; Hopefully someone can spot my short-sightedness in the above posted expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE TO ORIGINAL POST - 12/20/2013 @ 2:19pm EST&lt;/P&gt;&lt;P&gt;I have now added a sample document to help illustrate the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* Although I do trust Henric's alternative suggestion, this will still bother me until I can at least understand WHY.&amp;nbsp; The syntax seems to work correctly in one instance, but not the other.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2013 16:23:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-expression-work-in-one-instance-and-not-the-other/m-p/515926#M1124867</guid>
      <dc:creator />
      <dc:date>2013-12-20T16:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this expression work in one instance and not the other?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-expression-work-in-one-instance-and-not-the-other/m-p/515927#M1124868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the &lt;STRONG&gt;Match&lt;/STRONG&gt; function..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2013 16:28:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-expression-work-in-one-instance-and-not-the-other/m-p/515927#M1124868</guid>
      <dc:creator />
      <dc:date>2013-12-20T16:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this expression work in one instance and not the other?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-expression-work-in-one-instance-and-not-the-other/m-p/515928#M1124869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Raja,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;I appreciate the quick reply.&amp;nbsp; I am not seeing any difference in the results using that approach, if I understood you suggestion correctly, here is what I tried.&amp;nbsp; As with the examples in the original post, it works good when the ELSE portion is a simple string '~OTHER~', but not when it is replaced with the other expression (that works fine on it's own and for the 7 other real fields).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;WildMatch&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;GetCurrentField&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(cycl_DigitalAnalysis0), '*=if(*'),'Site/Product', '~OTHER~'&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;...this works fine. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;WildMatch&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;GetCurrentField&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(cycl_DigitalAnalysis0), '*=if(*'),'Site/Product', Only({&amp;lt;MapThisField={&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(=GetCurrentField(cycl_DigitalAnalysis0))&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} FldAlias_B)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;...but I still have that same problem when I exchange the ELSE portion with the ONLY() function.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2013 16:49:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-expression-work-in-one-instance-and-not-the-other/m-p/515928#M1124869</guid>
      <dc:creator />
      <dc:date>2013-12-20T16:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this expression work in one instance and not the other?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-expression-work-in-one-instance-and-not-the-other/m-p/515929#M1124870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With your method, every field label will be recalculated client-side every time a user clicks. This is CPU-intensive and further - as you have noticed - your formulae are error-prone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No, you should instead use the "Rename" statement in the end of the script to rename everything according to your Excel file. See more on &lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2012/09/25/how-to-rename-fields"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2012/09/25/how-to-rename-fields&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2013 16:53:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-expression-work-in-one-instance-and-not-the-other/m-p/515929#M1124870</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2013-12-20T16:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this expression work in one instance and not the other?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-expression-work-in-one-instance-and-not-the-other/m-p/515930#M1124871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Henric.&amp;nbsp; I agree with your suggestion whole-heartedly, but I was trying to prevent having to rebuild the whole document with the renamed fields, so I was hoping to keep the original names in place and show an alias name in certain areas ... but I'll have to admit, it does complicate managing things, especially with so many fields.&amp;nbsp; Not to mention the over-head.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2013 16:58:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-expression-work-in-one-instance-and-not-the-other/m-p/515930#M1124871</guid>
      <dc:creator />
      <dc:date>2013-12-20T16:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this expression work in one instance and not the other?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-expression-work-in-one-instance-and-not-the-other/m-p/515931#M1124872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh, you don't need to rebuild anything. That should work straight off. Normally objects pick up a changed field name automagically &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try it!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2013 17:02:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-expression-work-in-one-instance-and-not-the-other/m-p/515931#M1124872</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2013-12-20T17:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this expression work in one instance and not the other?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-expression-work-in-one-instance-and-not-the-other/m-p/515932#M1124873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d;"&gt;Hi Chris,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: white;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: white;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Helvetica','sans-serif'; color: #3d3d3d;"&gt;Sry, Give me little time... I am trying it and update you...&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2013 17:15:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-expression-work-in-one-instance-and-not-the-other/m-p/515932#M1124873</guid>
      <dc:creator />
      <dc:date>2013-12-20T17:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this expression work in one instance and not the other?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-expression-work-in-one-instance-and-not-the-other/m-p/515933#M1124874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I finally stumbled into the answer for this question by trial and error, so in case anyone else is interested, here was the solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Created Variable: vTEST&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;vTEST content: [=Only({&amp;lt;MapThisField={$(=GetCurrentField(cycl_DigitalAnalysis0))}&amp;gt;} FldAlias_B)]&lt;BR /&gt;...(without the brackets --- and note, the leading equal sign is important!)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Which now allows this expression to function as expected --- see original post for comparative differences.&lt;/P&gt;&lt;P&gt;=if(GetCurrentField(cycl_DigitalAnalysis0) LIKE '*=if(*', 'Site/Product', vTEST)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2013 22:15:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-expression-work-in-one-instance-and-not-the-other/m-p/515933#M1124874</guid>
      <dc:creator />
      <dc:date>2013-12-23T22:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this expression work in one instance and not the other?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-expression-work-in-one-instance-and-not-the-other/m-p/515934#M1124875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christopher,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried your solution too but not working don't know why, Interested to see if possible can you attach a sample will be helpful just make some changes with the demo App you already shared &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers!!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2013 08:38:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-expression-work-in-one-instance-and-not-the-other/m-p/515934#M1124875</guid>
      <dc:creator>qlikpahadi07</dc:creator>
      <dc:date>2013-12-24T08:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Why does this expression work in one instance and not the other?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-expression-work-in-one-instance-and-not-the-other/m-p/515935#M1124876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;QlikPahadi07.&amp;nbsp; Sorry for the delay in reply.&amp;nbsp; Here is an updated version of the QVW with a working example of the solution added below the original question scenario.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2013 19:22:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-expression-work-in-one-instance-and-not-the-other/m-p/515935#M1124876</guid>
      <dc:creator />
      <dc:date>2013-12-24T19:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this expression work in one instance and not the other?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-expression-work-in-one-instance-and-not-the-other/m-p/515936#M1124877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks For Sharing Chris &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;Merry Christmas!!!! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Dec 2013 04:41:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-expression-work-in-one-instance-and-not-the-other/m-p/515936#M1124877</guid>
      <dc:creator>qlikpahadi07</dc:creator>
      <dc:date>2013-12-25T04:41:35Z</dc:date>
    </item>
  </channel>
</rss>

