<?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 Alternate State and variables in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Alternate-State-and-variables/m-p/1707559#M54285</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;According to help, it's possible to allocate a state to a variable:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080"&gt;If you have a state named&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="Code"&gt;MyState&lt;/SPAN&gt;, and a variable named&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="Code"&gt;vMyVar&lt;/SPAN&gt;:&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT color="#800080"&gt;&lt;SPAN class="Code"&gt;$(vMyVar)&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;expands the variable in the default state.&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT color="#800080"&gt;&lt;SPAN class="Code"&gt;$({MyState} vMyVar)&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;expands the variable in the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="Code"&gt;MyState&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;state.&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;But when I try to do so, the expression is it doesn't work and null values are shown.&lt;/P&gt;&lt;P&gt;The variable vTest is: Count(DISTINCT DocumentNumber).&lt;/P&gt;&lt;P&gt;The expression I wrote:&amp;nbsp;$({TestState} vTest)&lt;/P&gt;&lt;P&gt;I would like it to expand to:&amp;nbsp;Count({TestState} distinct DocumentNumber)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AS.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/34834iE704A5650C61FC49/image-size/large?v=v2&amp;amp;px=999" role="button" title="AS.png" alt="AS.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Would appreciate some help...&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 21 Dec 2021 22:06:32 GMT</pubDate>
    <dc:creator>dana</dc:creator>
    <dc:date>2021-12-21T22:06:32Z</dc:date>
    <item>
      <title>Alternate State and variables</title>
      <link>https://community.qlik.com/t5/App-Development/Alternate-State-and-variables/m-p/1707559#M54285</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;According to help, it's possible to allocate a state to a variable:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080"&gt;If you have a state named&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="Code"&gt;MyState&lt;/SPAN&gt;, and a variable named&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="Code"&gt;vMyVar&lt;/SPAN&gt;:&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT color="#800080"&gt;&lt;SPAN class="Code"&gt;$(vMyVar)&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;expands the variable in the default state.&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT color="#800080"&gt;&lt;SPAN class="Code"&gt;$({MyState} vMyVar)&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;expands the variable in the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="Code"&gt;MyState&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;state.&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;But when I try to do so, the expression is it doesn't work and null values are shown.&lt;/P&gt;&lt;P&gt;The variable vTest is: Count(DISTINCT DocumentNumber).&lt;/P&gt;&lt;P&gt;The expression I wrote:&amp;nbsp;$({TestState} vTest)&lt;/P&gt;&lt;P&gt;I would like it to expand to:&amp;nbsp;Count({TestState} distinct DocumentNumber)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AS.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/34834iE704A5650C61FC49/image-size/large?v=v2&amp;amp;px=999" role="button" title="AS.png" alt="AS.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Would appreciate some help...&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 22:06:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Alternate-State-and-variables/m-p/1707559#M54285</guid>
      <dc:creator>dana</dc:creator>
      <dc:date>2021-12-21T22:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: Alternate State and variables</title>
      <link>https://community.qlik.com/t5/App-Development/Alternate-State-and-variables/m-p/1760615#M58802</link>
      <description>&lt;P&gt;Also struggling with this issue. Did you find a solution&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/68009"&gt;@dana&lt;/a&gt;?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2020 09:34:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Alternate-State-and-variables/m-p/1760615#M58802</guid>
      <dc:creator>DClayton</dc:creator>
      <dc:date>2020-11-11T09:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: Alternate State and variables</title>
      <link>https://community.qlik.com/t5/App-Development/Alternate-State-and-variables/m-p/1762665#M59005</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Sorry for the late response...&lt;/P&gt;&lt;P&gt;No, I didn't..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 17:42:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Alternate-State-and-variables/m-p/1762665#M59005</guid>
      <dc:creator>dana</dc:creator>
      <dc:date>2020-11-18T17:42:46Z</dc:date>
    </item>
  </channel>
</rss>

