Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
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.
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
thanks you