<?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: Master Calendar and Section Access in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Master-Calendar-and-Section-Access/m-p/1730257#M55682</link>
    <description>&lt;P&gt;Hi Brett,&lt;/P&gt;&lt;P&gt;You are right... Last time I moved the precede loads also to the end and that "turned off" the SA . Now I moved just the Section Access part and got it working as expected. Unfortunately it did not solved the problem.&lt;BR /&gt;&lt;BR /&gt;On QS SaaS&amp;nbsp; I don't need to close and reopen the app to the Section Access work. Double tested it. Just by reloading the app the data is reduced as expected or shown if I "turn off" the script.&lt;/P&gt;</description>
    <pubDate>Thu, 23 Jul 2020 12:09:23 GMT</pubDate>
    <dc:creator>sfbi</dc:creator>
    <dc:date>2020-07-23T12:09:23Z</dc:date>
    <item>
      <title>Master Calendar and Section Access</title>
      <link>https://community.qlik.com/t5/App-Development/Master-Calendar-and-Section-Access/m-p/1728170#M55511</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I'm having an issue with master calendar and session access on Qlik Sense (Saas).&lt;/P&gt;&lt;P&gt;My Session Access Script, use the field&amp;nbsp;&lt;STRONG&gt;[ID_LOCATION]&lt;/STRONG&gt; as REDUCTION to reduce data for each user, but the same &lt;STRONG&gt;[IDLOCATION]&lt;/STRONG&gt; is linked to the fact table and Date Bridge:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Section Access;
LOAD
ACCESS,
USERID,
§REDUCTION,
OMIT
FROM tbX;

Section Application;

....

FACT_TABLE:
LOAD
[ID_FACT],
[DATE_FACT],
[ID_LOCATION],
[QT_FACT]
FROM tbFACT;

DateBridge:
Load 
[ID_FACT], 
[DATE_FACT] as CalendarDate, 
'FACT' as DateType
Resident FACT_TABLE;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The MasterCalendar script follow as usual after this part.&lt;/P&gt;&lt;P&gt;If I "turn off" the session access script, all date range are set correctly.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;My question is: there's any way to ignore the session access (IDLOCATION/REDUCTION) when creating the MasterCalendar? Or any other idea? I can't exclude the [ID_LOCATION] from the fact table, as I need it as a dimension on the app.&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;/P&gt;&lt;P&gt;Henrique&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 01:53:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Master-Calendar-and-Section-Access/m-p/1728170#M55511</guid>
      <dc:creator>sfbi</dc:creator>
      <dc:date>2024-11-16T01:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: Master Calendar and Section Access</title>
      <link>https://community.qlik.com/t5/App-Development/Master-Calendar-and-Section-Access/m-p/1728412#M55529</link>
      <description>&lt;P&gt;I would have a look at the two following Design Blog posts, hopefully they will provide the information you need to get things working as you wish:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/A-Primer-on-Section-Access/ba-p/1465766" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/A-Primer-on-Section-Access/ba-p/1465766&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/The-Master-Calendar/ba-p/1471527" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/The-Master-Calendar/ba-p/1471527&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Sorry I do not have anything better, but hopefully this helps you move forward.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 12:04:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Master-Calendar-and-Section-Access/m-p/1728412#M55529</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2020-07-16T12:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: Master Calendar and Section Access</title>
      <link>https://community.qlik.com/t5/App-Development/Master-Calendar-and-Section-Access/m-p/1728439#M55540</link>
      <description>&lt;P&gt;Thank you Brett... Unfortunately I've checked both links already and couldn't find a way yet...&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 12:48:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Master-Calendar-and-Section-Access/m-p/1728439#M55540</guid>
      <dc:creator>sfbi</dc:creator>
      <dc:date>2020-07-16T12:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: Master Calendar and Section Access</title>
      <link>https://community.qlik.com/t5/App-Development/Master-Calendar-and-Section-Access/m-p/1728544#M55550</link>
      <description>&lt;P&gt;Try moving your Section Access script to the end of the script to see if that does the trick, only potentially easy thing of which I can think that might help given what you said about things.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 17:05:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Master-Calendar-and-Section-Access/m-p/1728544#M55550</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2020-07-16T17:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: Master Calendar and Section Access</title>
      <link>https://community.qlik.com/t5/App-Development/Master-Calendar-and-Section-Access/m-p/1728704#M55561</link>
      <description>&lt;P&gt;Hi, maybe you can add a not-real FACT that is assigned to all dates and locations.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;tmpSynthFact:
LOAD 
  FieldValue('DAFACT', RecNo()) as DAFACT
Autogenerate FieldValueCount('DAFACT');

Outer Join (tmpSynthFact)
LOAD 
  FieldValue('ID_LOCATION', RecNo()) as ID_LOCATION,
  0 as ID_FACT
Autogenerate FieldValueCount('ID_LOCATION');
Concatenate (FACT_TABLE) LOAD * Resident tmpSynthFact;
DROP Table tmpSynthFact;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;The counterpart is that this fact will be shown, this can be avoided using one field to link tables and another to show the data on the app.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2020 06:27:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Master-Calendar-and-Section-Access/m-p/1728704#M55561</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2020-07-17T06:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Master Calendar and Section Access</title>
      <link>https://community.qlik.com/t5/App-Development/Master-Calendar-and-Section-Access/m-p/1728865#M55569</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22593"&gt;@rubenmarin&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I got your point. Tried that, but anytime I need to link it to the Fact Table, by any field, the section access won't show all dates (that's the way it works right?)...&lt;BR /&gt;&lt;BR /&gt;Using different fieldname is possible, but I'll lose all links with other tables and show data that is not allowed for some users... I've changed on fact table [ID_LOCATION] to [ID_LOCATION_X] and loaded the LOCATION TABLE with the same changes ID_LOCATION_X, NM_LOCATION_X ... got all dates on mastercalendar, but as section access is not reducing data now, it is showing all LOCATIONs to all users now, witch is not allowed...&lt;BR /&gt;&lt;BR /&gt;This situation might not have a solution, unless section access could ignore some fields to be reduced...&lt;BR /&gt;Anyway, thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2020 14:52:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Master-Calendar-and-Section-Access/m-p/1728865#M55569</guid>
      <dc:creator>sfbi</dc:creator>
      <dc:date>2020-07-17T14:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: Master Calendar and Section Access</title>
      <link>https://community.qlik.com/t5/App-Development/Master-Calendar-and-Section-Access/m-p/1728893#M55571</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/14114"&gt;@Brett_Bleess&lt;/a&gt;&amp;nbsp; this action disable the section access&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2020 16:44:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Master-Calendar-and-Section-Access/m-p/1728893#M55571</guid>
      <dc:creator>sfbi</dc:creator>
      <dc:date>2020-07-17T16:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: Master Calendar and Section Access</title>
      <link>https://community.qlik.com/t5/App-Development/Master-Calendar-and-Section-Access/m-p/1729919#M55666</link>
      <description>&lt;P&gt;Moving Section Access table load to the end of the script should not impact things, it should still work, be sure you exit the application after reload though and reopen, as post reload, the app will be wide open, that is by design, you have to save, close and reopen for Section Access to kick back in...&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2020 14:05:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Master-Calendar-and-Section-Access/m-p/1729919#M55666</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2020-07-22T14:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: Master Calendar and Section Access</title>
      <link>https://community.qlik.com/t5/App-Development/Master-Calendar-and-Section-Access/m-p/1730257#M55682</link>
      <description>&lt;P&gt;Hi Brett,&lt;/P&gt;&lt;P&gt;You are right... Last time I moved the precede loads also to the end and that "turned off" the SA . Now I moved just the Section Access part and got it working as expected. Unfortunately it did not solved the problem.&lt;BR /&gt;&lt;BR /&gt;On QS SaaS&amp;nbsp; I don't need to close and reopen the app to the Section Access work. Double tested it. Just by reloading the app the data is reduced as expected or shown if I "turn off" the script.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 12:09:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Master-Calendar-and-Section-Access/m-p/1730257#M55682</guid>
      <dc:creator>sfbi</dc:creator>
      <dc:date>2020-07-23T12:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: Master Calendar and Section Access</title>
      <link>https://community.qlik.com/t5/App-Development/Master-Calendar-and-Section-Access/m-p/1730262#M55683</link>
      <description>&lt;P&gt;Ah, sorry, forgot you were in Sense, I get stuck in QlikView and that is how things work there, apologies for the confusion.&amp;nbsp; Not sure regarding the underlying issue here, if this can be replicated pretty easily, I would suggest opening up a support case, so we can have a look at things more directly at this point.&amp;nbsp; I know there are a few quirks about Section Access in Sense, but off the top of my head, I cannot think of what may be wrong.&amp;nbsp; The only other thing I could recommend is looking at the option of commenting you Section Access line in the script to have that table load as part of your visible data model such that you can see if things are linking correctly that way and you get the expected reductions when selecting different users, only way of which I can think to try to narrow things down on your own.&amp;nbsp; That should work in Sense like it does in QlikView as far as I know, and that may provide a clue.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 12:16:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Master-Calendar-and-Section-Access/m-p/1730262#M55683</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2020-07-23T12:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: Master Calendar and Section Access</title>
      <link>https://community.qlik.com/t5/App-Development/Master-Calendar-and-Section-Access/m-p/1730283#M55684</link>
      <description>&lt;P&gt;I got a solution for this specific case. I've created a second REDUCTION field (§REDUCTIONDATE), and gave it the 'ALL' value.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;here is the script. Any improvement please feel free to colaborate.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;//LOAD THE LOCATION TABLE AND RENAME THE FIELD TO REDUCTION.

LIB CONNECT TO 'LibX:LOCATION';
LOCATIONSession:
SQL SELECT 
"IDLOCATION"
FROM JSON (wrap off) "LOCATION";

LOCATION:
LOAD	IDLOCATION AS REDUCTION
RESIDENT LOCATIONSession;
DROP TABLE LOCATIONSession;

//CREATE THE §REDUCTION TABLE
§REDUCTION:
Load distinct
REDUCTION,
REDUCTION as §REDUCTION
resident LOCATION;
//DROP LOCATION TABLE.
drop table LOCATION;

//APPLY ALL A §REDUCTION
Load
REDUCTION,
'ALL' as §REDUCTION
resident §REDUCTION;

//CREATE THE SECTION ACCESS. TWO REDUCTION FIELDS, FOR DIFFERENT PURPOSES. 
//ALL USERS HAVE THE 'ALL' VALUE SET FOR REDUCTIONDATE FIELD ON THE AUTH TABLE.
Section Access;
LOAD
    ACCESS,
    USERID,
    §REDUCTION,
    §REDUCTIONDATE,
    OMIT
FROM [YOUR TABLE OR FILE];

//CREATE THE SECTION APP.
Section Application;

//NOW LOAD THE FACT TABLE. ADDED THE 'ALL' VALUE AS §REDUCTIONDATE. I NEED TO RENAME DAFACT TO TempDate TO AVOID CIRULAR REFERENCE.
//USING INCREMENTAL LOAD FRO QVDs. SO THERE'S NO SQLs ON THIS LOADS.
FACT_TABLE:
LOAD
    IDFACT,
    DATE(DAFACT,'DD/MM/YYYY') as TempDate,
    IDPLACE,
    FACT_QTD,
    'ALL' AS §REDUCTIONDATE   
FROM FACT_TABLE;

//LOAD THE PLACE TABLE. IN THIS CASE IS AN INTERMEDIATE "LOCATION" THAT IS LINK THE FACT TABLE TO THE LOCATION TABLE.
PLACE:
LOAD
    IDPLACE,
    NMPLACE,
    IDLOCATION
FROM PLACE_TABLE
where Exists(IDPLACE);

//RELOAD THE LOCATION AND CREATE THE REDUCTION LINK. 
LOCATION:
LOAD
     IDLOCATION,
     IDLOCATION AS REDUCTION,
     NMLOCATION
    where Exists(IDLOCATION);
SQL SELECT 
	"IDLOCATION",
	"NMLOCATION"
FROM LOCATION_TABLE;

//NOW CREATE THE "MASTER CALENDAR".

//IN THIS CASE, I'M USING TODAY() AS THE MAX DATE.  
Temp:  
Load  
min(TempDate) as minDate,
TODAY() as maxDate  
Resident FACT_TABLE;  
      
Let varMinDate = Num(Peek('minDate', 0, 'Temp'));  
Let varMaxDate = Num(Peek('maxDate', 0, 'Temp'));  
DROP Table Temp;  
      
TempCalendar:  
LOAD  
$(varMinDate) + Iterno()-1 As Num,  
Date($(varMinDate) + IterNo() - 1) as TempDate  
AutoGenerate 1 While $(varMinDate) + IterNo() -1 &amp;lt;= $(varMaxDate);  

//AGAIN SET 'ALL' TO §REDUCTIONDATE SO DATES WON'T BE REDUCED BY THE SECTION ACCESS.
MasterCalendar:
Load  
  DATE(TempDate,'DD/MM/YYYY') AS TempDate,
  'ALL' AS §REDUCTIONDATE,
  week(TempDate) As Week,  
   Year(TempDate) As Year,  
   Month(TempDate) As Month,  
   Day(TempDate) As Day 
Resident TempCalendar  
Order By TempDate ASC;
Drop Table TempCalendar;

//CREATE AN OUTER JOIN TO ALL DATES HAVE A LINK TO THE PLACES (IDPLACE), SO SELECTIONS BY PLACE WILL SHOW ALL DATES ALSO, EVEN IF PLACE DONT HAVE RELATION TO THE FACT DATE. THIS IS USEFUL FOR VISUALIZATIONS.
Outer Join
Load Distinct
IDPLACE
Resident PLACE;

//RELOAD THE FACT TABLE.
ReloadFact:
NoConcatenate
LOAD Distinct
IDFACT,
IDPLACE,
TempDate,
FACT_QTD
Resident FACT_TABLE;

//DROP TNE FACT_TABLE
Drop Table FACT_TABLE;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 12:57:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Master-Calendar-and-Section-Access/m-p/1730283#M55684</guid>
      <dc:creator>sfbi</dc:creator>
      <dc:date>2020-07-23T12:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: Master Calendar and Section Access</title>
      <link>https://community.qlik.com/t5/App-Development/Master-Calendar-and-Section-Access/m-p/1730289#M55687</link>
      <description>&lt;P&gt;So what I think you were hitting was related to the 'strict exclusion' setting, which is not adjustable in Sense, but it is in QlikView, but basically, if things occur such that a user does not have a any values attached to their view for the reduction field, that would lock them out of the application, so that is the only explanation I have at this point is something was causing a situation where there was no reduction value for some users etc., and therefore they were not allowed to open the application once Section Access with the reduction was applied.&amp;nbsp; The other thing you could have done in this case is just created the ALL value in the other reduction field that had a mapping table to map that value to all the other possible values, that is the only way around this of which I know, hopefully makes a little sense.&amp;nbsp; I would say what you did should be fine too though.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;May want to review the following Help link, that may cause something to click too:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense/June2020/Subsystems/Hub/Content/Sense_Hub/Scripting/Security/manage-security-with-section-access.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense/June2020/Subsystems/Hub/Content/Sense_Hub/Scripting/Security/manage-security-with-section-access.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 13:09:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Master-Calendar-and-Section-Access/m-p/1730289#M55687</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2020-07-23T13:09:44Z</dc:date>
    </item>
  </channel>
</rss>

