Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Gigi2
Contributor
Contributor

using section access

Hello All,

simple question:

i've a table A and i ve  implemented the section access to restrict the datas depending on the user.

The chart linked to the table A shows correctly  the datas. All fine !

Now i need to create a Table B resident table A and filtering  the rows Where the column Date is the MAX.

i ve tried different approach without succes!

in the example below i ll show one of this..

//create a temporary table called MaxDate and then like this one

MaxDate:
Load
Date(Max(TRADINGDATE),'DD.MM.YYYY hh:mm:ss') as MAXTRADINGDATE
Resident TABLE_A;

// Load the value into a variable using Peek because the intention will be then to LOAD Table_B where TRADINGDATE=vMAXTRADINGDATE
LET vMAXTRADINGDATE = Date(Peek('MAXTRADINGDATE', 0, 'MaxDate'));

MyProblem: The variable vMAXTRADINGDATE takes a value from table A which does not belong to this USER but to another. It therefore seems that the Peek function retrieves the Max(date) from table A without taking the restrictions into account.

Thanks in advance for your advice.

 

Labels (6)
1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

As @PrashantSangle mentioned, the problem here is not section access 

Section Action is applied when a User Opens the App; whereas you are creating and defining the variable during reload

so the variable value is already being set after the refresh and Section Access is not going to change that default value

You can simply change the variable to be  evaluated dynamically by changing the definition

Steps

1) Delete the script variables TRADINGDATE ,  vMAXTRADINGDATE;

2) Create a new variable from the Dashboard >> Sheet View

3) vMaxDate   = Date(Max({1}MAXTRADINGDATE));

 

The variable vMaxDate will now evaluate when the user opens the app with section access applied

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

3 Replies
PrashantSangle

section access is not work as you are thinking. 

when you load data it will load all the data and then apply section access while user accessing dashboards. 

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
vinieme12
Champion III
Champion III

As @PrashantSangle mentioned, the problem here is not section access 

Section Action is applied when a User Opens the App; whereas you are creating and defining the variable during reload

so the variable value is already being set after the refresh and Section Access is not going to change that default value

You can simply change the variable to be  evaluated dynamically by changing the definition

Steps

1) Delete the script variables TRADINGDATE ,  vMAXTRADINGDATE;

2) Create a new variable from the Dashboard >> Sheet View

3) vMaxDate   = Date(Max({1}MAXTRADINGDATE));

 

The variable vMaxDate will now evaluate when the user opens the app with section access applied

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Gigi2
Contributor
Contributor
Author

thanks you