<?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: Externalising security to tabs in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Externalising-security-to-tabs/m-p/864079#M302414</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Geoff,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check out the following post:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/docs/DOC-4962"&gt;https://community.qlik.com/docs/DOC-4962&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH - Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Jul 2015 15:12:26 GMT</pubDate>
    <dc:creator>awhitfield</dc:creator>
    <dc:date>2015-07-01T15:12:26Z</dc:date>
    <item>
      <title>Externalising security to tabs</title>
      <link>https://community.qlik.com/t5/QlikView/Externalising-security-to-tabs/m-p/864078#M302413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi all,&lt;/P&gt;&lt;P&gt;I want to limit the display of tabs in a QlikView based on an individual users' security. Basically, I have a table which resembles the following . . .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;User&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Access&lt;/P&gt;&lt;P&gt;DomainName\Joe-Sales&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;DomainName\Joe-Inventory&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;DomainName\Fred-Sales&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;DomainName\Fred-Inventory&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;DomainName\Sally-Sales&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;DomainName\Sally-Inventory&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;On the actual tabs, within the sheet properties, I set the Show Sheet to be conditional with the following expression (i.e. for the Sales tabs) . . .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vShowSalesSheets) &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I then have the following Macro defined on the OnOpen trigger . . .&lt;/P&gt;&lt;P&gt;Sub SetSecurity&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; ' Get the current domain name\user ID.&lt;BR /&gt; vUserID = ActiveDocument.Evaluate("OSUser()")&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; ' Set the ID of the security table.&lt;BR /&gt; Set vSecurityTableID = ActiveDocument.GetSheetObject( "TB07" )&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; ' Set up the sales key, find it in the security table, retrieve the access and set the show sales sheets variable.&lt;BR /&gt; vUserIDQlikView = vUserID&amp;amp;"-Sales" &lt;BR /&gt; For vRowIter = 0 to vSecurityTableID.GetRowCount-1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set vCell = vSecurityTableID.GetCell(vRowIter,0)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If UCase(vCell.Text) = UCase(vUserIDQlikView) Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set vAccess = vSecurityTableID.GetCell(vRowIter,1)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActiveDocument.Variables("vShowSalesSheets").SetContent vAccess.Text, True&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End if&lt;BR /&gt; Next&lt;BR /&gt; &lt;BR /&gt; ' Set up the inventory key, find it in the security table, retrieve the access and set the show inventory sheets variable.&lt;BR /&gt; vUerIDQlikView = vUserID&amp;amp;"-Operation" &lt;BR /&gt; For vRowIter = 0 to vSecurityTableID.GetRowCount-1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set vCell = vSecurityTableID.GetCell(vRowIter,0)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If UCase(vCell.Text) = UCase(vUserIDQlikView) Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set vAccess = vSecurityTableID.GetCell(vRowIter,1)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActiveDocument.Variables("vShowInventoryheets").SetContent vAccess.Text, True&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End if&lt;BR /&gt; Next&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works OK when I run it on my PC but when I copy it to the AccessPoint and run it from there it doesn't run. Any ideas? I've tried different settings of the 'Requested Module Security' and 'Current Local Security' from within the Edit Module window but can't seem to get it to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this because Macros can't be run from the server. If so, how can I achieve what I want?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Geoff.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jul 2015 15:01:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Externalising-security-to-tabs/m-p/864078#M302413</guid>
      <dc:creator />
      <dc:date>2015-07-01T15:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: Externalising security to tabs</title>
      <link>https://community.qlik.com/t5/QlikView/Externalising-security-to-tabs/m-p/864079#M302414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Geoff,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check out the following post:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/docs/DOC-4962"&gt;https://community.qlik.com/docs/DOC-4962&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH - Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jul 2015 15:12:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Externalising-security-to-tabs/m-p/864079#M302414</guid>
      <dc:creator>awhitfield</dc:creator>
      <dc:date>2015-07-01T15:12:26Z</dc:date>
    </item>
  </channel>
</rss>

