<?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: Changing a variable if a specific field value is selected in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Changing-a-variable-if-a-specific-field-value-is-selected/m-p/973315#M645671</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think there are two ways:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Create a variable that changes value depending on your conditions, something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;showBrain:&lt;/P&gt;&lt;P&gt;= If( Only( YourFieldName ) = 'Brain', 1,0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Create a field event trigger OnSelect of&amp;nbsp; YourFieldName, with an action to change the variable (with a similar expression like above).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I would go for 1), since it's easier to understand what's happening when checking the variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Oct 2015 14:57:49 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2015-10-27T14:57:49Z</dc:date>
    <item>
      <title>Changing a variable if a specific field value is selected</title>
      <link>https://community.qlik.com/t5/QlikView/Changing-a-variable-if-a-specific-field-value-is-selected/m-p/973314#M645670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i defined a variable in my document: &lt;/P&gt;&lt;P&gt;showBrain = 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i have an image with the condition that it will only be shown if showBrain = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I now need some kind of trigger or something similar which detects when a specific value in a table is selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for instance i have the table:&lt;/P&gt;&lt;P&gt;Eye&lt;/P&gt;&lt;P&gt;Brain&lt;/P&gt;&lt;P&gt;Stomache&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;Only if the Brain is selected (exclusively meaning no other value in the table) then the variable showBrain is switched to =1.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;Eye&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Brain&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;Stomache &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also i need a second trigger. Even if the Brain is selected but anything else within the table is selected then the variable should switch back to showBrain =0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My biggest problem is that i do not exactly know where and how to define this trigger. I guess in the trigger properties for the document?&lt;/P&gt;&lt;P&gt;But i am not sure. Any help is very much appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2015 14:11:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changing-a-variable-if-a-specific-field-value-is-selected/m-p/973314#M645670</guid>
      <dc:creator />
      <dc:date>2015-10-27T14:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: Changing a variable if a specific field value is selected</title>
      <link>https://community.qlik.com/t5/QlikView/Changing-a-variable-if-a-specific-field-value-is-selected/m-p/973315#M645671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think there are two ways:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Create a variable that changes value depending on your conditions, something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;showBrain:&lt;/P&gt;&lt;P&gt;= If( Only( YourFieldName ) = 'Brain', 1,0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Create a field event trigger OnSelect of&amp;nbsp; YourFieldName, with an action to change the variable (with a similar expression like above).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I would go for 1), since it's easier to understand what's happening when checking the variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2015 14:57:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changing-a-variable-if-a-specific-field-value-is-selected/m-p/973315#M645671</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-10-27T14:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: Changing a variable if a specific field value is selected</title>
      <link>https://community.qlik.com/t5/QlikView/Changing-a-variable-if-a-specific-field-value-is-selected/m-p/973316#M645672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for that great reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i went for your first suggestion and it works great!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2015 10:08:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changing-a-variable-if-a-specific-field-value-is-selected/m-p/973316#M645672</guid>
      <dc:creator />
      <dc:date>2015-10-28T10:08:41Z</dc:date>
    </item>
  </channel>
</rss>

