<?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: OneAndOnlyOne Property in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/OneAndOnlyOne-Property/m-p/600916#M222318</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this in macro&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3d3d3d;"&gt;set field = ActiveDocument.Fields("YEAR")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3d3d3d;"&gt;field.Select "2014"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3d3d3d;"&gt;set fieldProperties = field.GetProperties&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3d3d3d;"&gt;fieldProperties.OneAndOnlyOne = true&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3d3d3d;"&gt;field.SetProperties fieldProperties&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3d3d3d;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3d3d3d;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Mar 2014 10:02:35 GMT</pubDate>
    <dc:creator>jagan</dc:creator>
    <dc:date>2014-03-05T10:02:35Z</dc:date>
    <item>
      <title>OneAndOnlyOne Property</title>
      <link>https://community.qlik.com/t5/QlikView/OneAndOnlyOne-Property/m-p/600913#M222315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two sheets (sheets1 and sheets2) with a listbox called YEAR with values 2011, 2012, 2013 and 2014.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When sheets1 is open for the fist time, YEAR has to get value 2014, while, when sheets2 is open for the first time YEAR has to get no value.&lt;/P&gt;&lt;P&gt;Then, when sheets1 is open for next time, YEAR has to get last selected value, while, when sheets2 is open for next time, YEAR has to get always no value and go on...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the problem is focus on OneAndOnlyOne Property, but i don't know how i can overtake it.&lt;/P&gt;&lt;P&gt;Any suggest ?&lt;/P&gt;&lt;P&gt;Thank you so much for your precious help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2014 08:22:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OneAndOnlyOne-Property/m-p/600913#M222315</guid>
      <dc:creator />
      <dc:date>2014-03-05T08:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: OneAndOnlyOne Property</title>
      <link>https://community.qlik.com/t5/QlikView/OneAndOnlyOne-Property/m-p/600914#M222316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure if I understand you correctly. You need some selections in list box based on switching of sheets.&lt;/P&gt;&lt;P&gt;If so, then you can use actions/triggers to achieve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For 1st scenario (when sheet 1 is opened for the first time):&lt;/P&gt;&lt;P&gt;Assuming sheet 1 is your default sheet on opening the document. You can use Document trigger "OnOpen" of document. Use below action :&lt;/P&gt;&lt;P&gt;Action Type : Selection&lt;/P&gt;&lt;P&gt;Action : Select in field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you can give field name as YEAR and Search string as 2014.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For 2nd Scenario (when 2nd sheet is opened) :&lt;/P&gt;&lt;P&gt;Use "Sheet Event Triggers" and give action "OnActivateSheet" :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Action Type : Selection&lt;/P&gt;&lt;P&gt;Action : Clear Other field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give Field name as YEAR.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;This way when you open sheet 2 anytime, it will not have any value in YEAR.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2014 08:45:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OneAndOnlyOne-Property/m-p/600914#M222316</guid>
      <dc:creator />
      <dc:date>2014-03-05T08:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: OneAndOnlyOne Property</title>
      <link>https://community.qlik.com/t5/QlikView/OneAndOnlyOne-Property/m-p/600915#M222317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;thank you for your help.&lt;/P&gt;&lt;P&gt;Your suggest was useful for my project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just a revision: the action i have used in Sheet Event Triggers was "Clear Field" instead of "Clear Other Fields".&lt;/P&gt;&lt;P&gt;Now sounds good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But there is another problem: OneAndOnlyOne property of listbox YEAR is setted on "false" and it's ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Switching from Sheets2 to Sheets1 it would be necessary that, only in Sheets1, this property was setted on "true" and switching from Sheets1 to Sheets2 on "false".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i do ?&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2014 09:46:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OneAndOnlyOne-Property/m-p/600915#M222317</guid>
      <dc:creator />
      <dc:date>2014-03-05T09:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: OneAndOnlyOne Property</title>
      <link>https://community.qlik.com/t5/QlikView/OneAndOnlyOne-Property/m-p/600916#M222318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this in macro&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3d3d3d;"&gt;set field = ActiveDocument.Fields("YEAR")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3d3d3d;"&gt;field.Select "2014"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3d3d3d;"&gt;set fieldProperties = field.GetProperties&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3d3d3d;"&gt;fieldProperties.OneAndOnlyOne = true&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3d3d3d;"&gt;field.SetProperties fieldProperties&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3d3d3d;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #3d3d3d;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2014 10:02:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OneAndOnlyOne-Property/m-p/600916#M222318</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-03-05T10:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: OneAndOnlyOne Property</title>
      <link>https://community.qlik.com/t5/QlikView/OneAndOnlyOne-Property/m-p/600917#M222319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds good.&lt;/P&gt;&lt;P&gt;Thank you !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just another question.&lt;/P&gt;&lt;P&gt;In this macro, Is it possible to replace the value "2014" with a variable that contains the maximum value of the field "YEAR" of my table "ANAGRAFICA" loaded in the initial script of QlikView?&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefano&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set field = ActiveDocument.Fields("YEAR")&lt;/P&gt;&lt;P&gt;field.Select &lt;STRONG&gt;"2014"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;set fieldProperties = field.GetProperties&lt;/P&gt;&lt;P&gt;fieldProperties.OneAndOnlyOne = true&lt;/P&gt;&lt;P&gt;field.SetProperties fieldProperties&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2014 10:32:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OneAndOnlyOne-Property/m-p/600917#M222319</guid>
      <dc:creator />
      <dc:date>2014-03-05T10:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: OneAndOnlyOne Property</title>
      <link>https://community.qlik.com/t5/QlikView/OneAndOnlyOne-Property/m-p/600918#M222320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create one variable like this in Settings -&amp;gt; Variable Overview&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vMaxYear = Max({1} YEAR)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;field.Select&lt;/SPAN&gt;&amp;nbsp; = ActiveDocument.Variables("vMaxYear ").GetContent.String)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 04:44:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OneAndOnlyOne-Property/m-p/600918#M222320</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-03-07T04:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: OneAndOnlyOne Property</title>
      <link>https://community.qlik.com/t5/QlikView/OneAndOnlyOne-Property/m-p/600919#M222321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jagan, great one !&lt;/P&gt;&lt;P&gt;It works perfectly.&lt;/P&gt;&lt;P&gt;Thank you so much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i need more help, may i contact you again ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefano.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 08:00:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OneAndOnlyOne-Property/m-p/600919#M222321</guid>
      <dc:creator />
      <dc:date>2014-03-07T08:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: OneAndOnlyOne Property</title>
      <link>https://community.qlik.com/t5/QlikView/OneAndOnlyOne-Property/m-p/600920#M222322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just post in community, if I am available I will answer otherwise other friends in Community will answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 08:07:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OneAndOnlyOne-Property/m-p/600920#M222322</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-03-07T08:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: OneAndOnlyOne Property</title>
      <link>https://community.qlik.com/t5/QlikView/OneAndOnlyOne-Property/m-p/600921#M222323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right !&lt;/P&gt;&lt;P&gt;Have a nice day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefano&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 08:12:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OneAndOnlyOne-Property/m-p/600921#M222323</guid>
      <dc:creator />
      <dc:date>2014-03-07T08:12:22Z</dc:date>
    </item>
  </channel>
</rss>

