<?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 one variable to set the value for another variable in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Using-one-variable-to-set-the-value-for-another-variable/m-p/2139725#M92644</link>
    <description>&lt;P&gt;Try like this, I've noticed in the past that sometimes QS is not updating variables but using the variable expansion syntax works better:&lt;BR /&gt;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;=if($(={inherited} vReg_Pack) = $(={[Reg Pack]}REG_PK),$(={[Reg Pack]}REG_PK))&lt;/FONT&gt;&lt;BR /&gt;&lt;/SPAN&gt;or if the variables are strings&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;=if('$(={inherited} vReg_Pack)' = '$(={[Reg Pack]}REG_PK)','$(={[Reg Pack]}REG_PK)')&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Nov 2023 10:42:50 GMT</pubDate>
    <dc:creator>vincent_ardiet_</dc:creator>
    <dc:date>2023-11-21T10:42:50Z</dc:date>
    <item>
      <title>Using one variable to set the value for another variable</title>
      <link>https://community.qlik.com/t5/App-Development/Using-one-variable-to-set-the-value-for-another-variable/m-p/2136618#M92365</link>
      <description>&lt;P&gt;I dont know if anyone can help me with a problem I have .&lt;/P&gt;
&lt;P&gt;On a sheet I have 4 filter panes and 3 tables. 2 of the tables are on one alternate state and the third on a separate one. The reason for this is when I search, in most cases it will be a serial number, it only returns one row. On that row there is a registration number that can have several serial numbers assigned to it but only the filtered one will be displayed. I want to display all the serials assigned to that registration number. The main problem is that the registration number will be unknown at the time of searching otherwise I could just filter by that. Normally only the serial number is known. I want to use the registration number to act as the filter in the third table. What I need to have is the variable from one state to set the value for a different alternate state. i am not 100% sure this is possible.&lt;/P&gt;
&lt;P&gt;The variables are&amp;nbsp; vReg_Pack wit ha definition of&amp;nbsp;=REG_PK. This works fine.&lt;/P&gt;
&lt;P&gt;and&lt;/P&gt;
&lt;P&gt;vRegistration_Pack with a definition of&amp;nbsp;=$({Reg Pack}REG_PK) but I think this is probably the wrong definition&amp;nbsp;&lt;/P&gt;
&lt;P&gt;what I need is for&amp;nbsp; vReg_Pack&amp;nbsp; to equal&amp;nbsp;vRegistration_Pack or&amp;nbsp; the other way round&lt;/P&gt;
&lt;P&gt;Any help will be greatly appreciated&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 09:36:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-one-variable-to-set-the-value-for-another-variable/m-p/2136618#M92365</guid>
      <dc:creator>Lewi2763</dc:creator>
      <dc:date>2023-11-10T09:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using one variable to set the value for another variable</title>
      <link>https://community.qlik.com/t5/App-Development/Using-one-variable-to-set-the-value-for-another-variable/m-p/2136630#M92368</link>
      <description>&lt;P&gt;You can try with something like&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;=Only(&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;{Reg Pack}REG_PK)&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 09:56:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-one-variable-to-set-the-value-for-another-variable/m-p/2136630#M92368</guid>
      <dc:creator>vincent_ardiet_</dc:creator>
      <dc:date>2023-11-10T09:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using one variable to set the value for another variable</title>
      <link>https://community.qlik.com/t5/App-Development/Using-one-variable-to-set-the-value-for-another-variable/m-p/2136635#M92370</link>
      <description>&lt;P&gt;No that didn't work. Tried using in the&amp;nbsp; expression and the variable separately but both returned the error of "Error in expression'}' expected".&amp;nbsp; Tried copying as well as typing it out.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 10:06:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-one-variable-to-set-the-value-for-another-variable/m-p/2136635#M92370</guid>
      <dc:creator>Lewi2763</dc:creator>
      <dc:date>2023-11-10T10:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: Using one variable to set the value for another variable</title>
      <link>https://community.qlik.com/t5/App-Development/Using-one-variable-to-set-the-value-for-another-variable/m-p/2136643#M92371</link>
      <description>&lt;P&gt;Yes, sorry, as there is a space in the name of your alternate state you have to use brackets or double quotes:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;=Only(&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;{&lt;STRONG&gt;[&lt;/STRONG&gt;Reg Pack&lt;STRONG&gt;]&lt;/STRONG&gt;}REG_PK)&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 10:16:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-one-variable-to-set-the-value-for-another-variable/m-p/2136643#M92371</guid>
      <dc:creator>vincent_ardiet_</dc:creator>
      <dc:date>2023-11-10T10:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using one variable to set the value for another variable</title>
      <link>https://community.qlik.com/t5/App-Development/Using-one-variable-to-set-the-value-for-another-variable/m-p/2136645#M92372</link>
      <description>&lt;P&gt;Thanks. that probably explains a lot of the issues i have seen.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 10:20:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-one-variable-to-set-the-value-for-another-variable/m-p/2136645#M92372</guid>
      <dc:creator>Lewi2763</dc:creator>
      <dc:date>2023-11-10T10:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using one variable to set the value for another variable</title>
      <link>https://community.qlik.com/t5/App-Development/Using-one-variable-to-set-the-value-for-another-variable/m-p/2136657#M92374</link>
      <description>&lt;P&gt;i think they will have to do it manually. They can search for the serial number then take the reg number and enter that into the filter pane. Its not that much of an issue. I was just trying to make things easier for them.&lt;/P&gt;
&lt;P&gt;Thanks for the help&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 10:36:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-one-variable-to-set-the-value-for-another-variable/m-p/2136657#M92374</guid>
      <dc:creator>Lewi2763</dc:creator>
      <dc:date>2023-11-10T10:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using one variable to set the value for another variable</title>
      <link>https://community.qlik.com/t5/App-Development/Using-one-variable-to-set-the-value-for-another-variable/m-p/2139722#M92643</link>
      <description>&lt;P&gt;i have revisited this issue and&amp;nbsp;&lt;SPAN&gt;&lt;SPAN class="ui-provider ed bps bpt bpu bpv bpw bpx bpy bpz bqa bqb bqc bqd bqe bqf bqg bqh bqi bqj bqk bql bqm bqn bqo bqp bqq bqr bqs bqt bqu bqv bqw bqx bqy bqz"&gt;I have got an expression that works but very strangely only once. The expression is =if({inherited} vReg_Pack = {[Reg Pack]}REG_PK,{[Reg Pack]}REG_PK).&amp;nbsp; What it does is takes the variable vReg_Pack from the alternate state "inherited". It then compares that value to the values in the REG_PK column in the other alternate state " Reg Pack "and if it matches it then displays it in the table in the alternate state 2Reg Pack". When I enter the expression and click apply it applies the expression and filters the table correctly. The problem is when I change the serial number the table stays the same even though the variable vReg_Pack changes. Even stranger if I go back into the expression and edit it and then apply it again it will work. Is there a command I&amp;nbsp;am missing that sort of retriggers the expression or something&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="ui-provider ed bps bpt bpu bpv bpw bpx bpy bpz bqa bqb bqc bqd bqe bqf bqg bqh bqi bqj bqk bql bqm bqn bqo bqp bqq bqr bqs bqt bqu bqv bqw bqx bqy bqz"&gt;Thanks for any ideas&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 10:36:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-one-variable-to-set-the-value-for-another-variable/m-p/2139722#M92643</guid>
      <dc:creator>Lewi2763</dc:creator>
      <dc:date>2023-11-21T10:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using one variable to set the value for another variable</title>
      <link>https://community.qlik.com/t5/App-Development/Using-one-variable-to-set-the-value-for-another-variable/m-p/2139725#M92644</link>
      <description>&lt;P&gt;Try like this, I've noticed in the past that sometimes QS is not updating variables but using the variable expansion syntax works better:&lt;BR /&gt;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;=if($(={inherited} vReg_Pack) = $(={[Reg Pack]}REG_PK),$(={[Reg Pack]}REG_PK))&lt;/FONT&gt;&lt;BR /&gt;&lt;/SPAN&gt;or if the variables are strings&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;=if('$(={inherited} vReg_Pack)' = '$(={[Reg Pack]}REG_PK)','$(={[Reg Pack]}REG_PK)')&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 10:42:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-one-variable-to-set-the-value-for-another-variable/m-p/2139725#M92644</guid>
      <dc:creator>vincent_ardiet_</dc:creator>
      <dc:date>2023-11-21T10:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: Using one variable to set the value for another variable</title>
      <link>https://community.qlik.com/t5/App-Development/Using-one-variable-to-set-the-value-for-another-variable/m-p/2139734#M92645</link>
      <description>&lt;P&gt;i tried that but got the message below&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Lewi2763_0-1700563780174.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/120296i5722ED3D8964496F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Lewi2763_0-1700563780174.png" alt="Lewi2763_0-1700563780174.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I counted the brackets and they match&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 10:50:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-one-variable-to-set-the-value-for-another-variable/m-p/2139734#M92645</guid>
      <dc:creator>Lewi2763</dc:creator>
      <dc:date>2023-11-21T10:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using one variable to set the value for another variable</title>
      <link>https://community.qlik.com/t5/App-Development/Using-one-variable-to-set-the-value-for-another-variable/m-p/2139737#M92646</link>
      <description>&lt;P&gt;the string one didn't return an error but it also didn't return any data&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 10:53:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-one-variable-to-set-the-value-for-another-variable/m-p/2139737#M92646</guid>
      <dc:creator>Lewi2763</dc:creator>
      <dc:date>2023-11-21T10:53:56Z</dc:date>
    </item>
  </channel>
</rss>

