<?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 Section access strategy for limiting data that users have a one-to-many relationship with (e.g. cost codes) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Section-access-strategy-for-limiting-data-that-users-have-a-one/m-p/228306#M712385</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Goal:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I want to use section access to restrict data users can see based on the cost codes to which they have permissions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problem:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The attached Data Protection PDF, while helpful, provided an example of data reduction only for a one-to-one relationship between user and department (i.e. each user is associated with only one department). In my scenario, each user will associated with many--but not all--cost codes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sample Data:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The cost code permissions table has multiple records for each user. It looks something like this:&lt;/P&gt;&lt;P&gt;USER COSTCODE&lt;/P&gt;&lt;P&gt;A 100-01&lt;/P&gt;&lt;P&gt;A 200-01&lt;/P&gt;&lt;P&gt;B 200-01&lt;/P&gt;&lt;P&gt;B 300-01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Questions:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Would this require multiple listings for each user in the Section Access table, one for each cost code? Or is there a different approach I should take?&lt;/P&gt;&lt;P&gt;Thanks for your feedback!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Apr 2011 11:40:15 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-04-25T11:40:15Z</dc:date>
    <item>
      <title>Section access strategy for limiting data that users have a one-to-many relationship with (e.g. cost codes)</title>
      <link>https://community.qlik.com/t5/QlikView/Section-access-strategy-for-limiting-data-that-users-have-a-one/m-p/228306#M712385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Goal:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I want to use section access to restrict data users can see based on the cost codes to which they have permissions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problem:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The attached Data Protection PDF, while helpful, provided an example of data reduction only for a one-to-one relationship between user and department (i.e. each user is associated with only one department). In my scenario, each user will associated with many--but not all--cost codes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sample Data:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The cost code permissions table has multiple records for each user. It looks something like this:&lt;/P&gt;&lt;P&gt;USER COSTCODE&lt;/P&gt;&lt;P&gt;A 100-01&lt;/P&gt;&lt;P&gt;A 200-01&lt;/P&gt;&lt;P&gt;B 200-01&lt;/P&gt;&lt;P&gt;B 300-01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Questions:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Would this require multiple listings for each user in the Section Access table, one for each cost code? Or is there a different approach I should take?&lt;/P&gt;&lt;P&gt;Thanks for your feedback!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2011 11:40:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Section-access-strategy-for-limiting-data-that-users-have-a-one/m-p/228306#M712385</guid>
      <dc:creator />
      <dc:date>2011-04-25T11:40:15Z</dc:date>
    </item>
    <item>
      <title>Section access strategy for limiting data that users have a one-to-many relationship with (e.g. cost codes)</title>
      <link>https://community.qlik.com/t5/QlikView/Section-access-strategy-for-limiting-data-that-users-have-a-one/m-p/228307#M712386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;redingtonct wrote:Would this require multiple listings for each user in the Section Access table, one for each cost code? Or is there a different approach I should take?&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;The short answer is: yes, you need to specify every possible COSTCODE value for each USER value.&lt;/P&gt;&lt;P&gt;However, its obviously tedious. So I'd recommend you to create a table, QVD, xls file or something similar with groups of users and memberships, for example, user A member of GROUP1, and user B member of GROUP2, so the section access script looks like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;SECTION ACCESS; LOAD ACCESS, USERID, PASSWORD, GROUPFROM SA.QVD (QVD) WHERE 1=1; SECTION APPLICATION; Correspondence: // inline or any other sourceLOAD * INLINE [GROUP, COSTCODEGROUP1, 100-01GROUP1, 200-01GROUP2, 200-01GROUP2, 300-01];&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Of course, in the example above, loading INLINE only takes you more time, but if the correspondence is possible, the script will be smaller.&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2011 12:29:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Section-access-strategy-for-limiting-data-that-users-have-a-one/m-p/228307#M712386</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-04-25T12:29:49Z</dc:date>
    </item>
    <item>
      <title>Section access strategy for limiting data that users have a one-to-many relationship with (e.g. cost codes)</title>
      <link>https://community.qlik.com/t5/QlikView/Section-access-strategy-for-limiting-data-that-users-have-a-one/m-p/228308#M712387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Miguel, thanks for offering the clarification.&lt;/P&gt;&lt;P&gt;In my case, this turns out to be fairly easy. Since the CostCodePermissionsTable includes a record for each cost code that a user has access to, and since the UserLogin is used in that table, I can simply use UserLogin as the GROUP in section access. The resultant code would look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;Section Access;&lt;BR /&gt;SQL&lt;BR /&gt;SELECT UPPER(UserLogin) as NTNAME,&lt;BR /&gt;CASE WHEN Role = 'VP' THEN'ADMIN'&lt;BR /&gt;ELSE 'USER'&lt;BR /&gt;END as ACCESS,&lt;BR /&gt;UPPER(UserLogin) as GROUP&lt;BR /&gt;FROM UsersTable;&lt;BR /&gt;Section Application;&lt;BR /&gt;SQL&lt;BR /&gt;SELECT UPPER(UserLogin) as GROUP, COSTCODE&lt;BR /&gt;FROM CostCodePermissionsTable;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2011 02:37:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Section-access-strategy-for-limiting-data-that-users-have-a-one/m-p/228308#M712387</guid>
      <dc:creator />
      <dc:date>2011-04-26T02:37:32Z</dc:date>
    </item>
  </channel>
</rss>

