Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys, it's a question I want to share with the community.
As far as I know, you can "reduce" data for users with an example like this (it will reduce the field Region dependind on who's registered) :
Section Access;
LOAD * INLINE [
ACCESS, USERID, PASSWORD, REGION
ADMIN, ADMIN, ADMIN,
USER, USER1, U1, AFRICA
USER, USER2, U2, AMERICA
];
Section Application;
SALES:
LOAD * INLINE [
REGION, PROFIT
AFRICA, 1000
AMERICA, 2000
];
But what about if I want to reduce the whole data depending on one field?
Here is what I'm talking :
Section Access;
LOAD * INLINE [
ACCESS, USERID, PASSWORD, MAXDATE
ADMIN, ADMIN, ADMIN,
USER, USER1, U1, "30/05/2011"
USER, USER2, U2, "30/05/2011"
];
Section Application;
SALES:
LOAD * INLINE [
REGION, PROFIT
AFRICA, 1000
AMERICA, 2000
];
( And X more tables).
How could I compare if the field MAXDATE of section access is lower than the current date, you will open the document, otherwise, your document will be opened with no data.
I hope I made myself understood.
If anybody knows how to do that, it will be very appreciated.
Many thanks in advance!!!
Marcel, I dont think you need to add this line Load *,today() as DataField; every where, since Qlikview work with assosiation between the table so it automatically relates the table and reduce the table.You1l need to added in only one place.
For the sake of cheking i have added few tables to my application and its working as expected.
Chek the attached application and let me knowif this works in your case. User Name and password for opening the application is same .
USERID, PASSWORD
ADMIN, ADMIN
USER1, U1
USER2, U2
Hope this helps you.
-Sridhar
hi,
I cannot quite understand what you are trying to do here as the "Strict Exclusion" associated with section access will prevent the document being opened if a users has no valid fields in the section application and your requirement seems to be the opening of the document but with no data visible if the security requirements are not met.
In the old days if you had an entry in section access but there was no corresponding values in that field in section application qlikview obligingly opened with everything visible. Same behaviour as when you select a value which has no link elsewhere it will undo any previous selections. There were workarounds for this and then Strict Exclusion was added to prevent this loophole existing. I do not know if that loophole exist anymore but you will have to find out if this is what you are aiming to do.
With section access joins are made on field values so I don't think out of the box you can have a situation whereby the MAXDATE can be compared to anything different to it, for eaxmple smaller than. Either you put into MAXDATE all the acceptable values of MAXDATE in section access which is possible or add some logic to evaluate what is acceptable. If acceptable put the same value in the same field in section access as it appears in section application.
Check this attached application.
User Name & Password to open this application are below.
USERID, PASSWORD
ADMIN, ADMIN
USER1, U1
USER2, U2
in this application if you open with ADMIN AND USER1 login then u`ll see all data, but if you open with USER2 login then i have reduced all the data (i.e. no data would be displayed). Since the max data for the USER2 in my application is 23/05/2011. so my application check the max date to current date, if max date is less than the current date then it will not display any data.(this logic is completely based on the session access)
check this and let me know if this helps you.
- Sridhar
Many thanks Sridhar this is what I was looking for.
But my next question is :
If I have 50 tables in my model data,
I have to add this line : Load *,today() as DataField; in every table. Isn't it?
Cumbersome work though.
Regards, Marcel.
Marcel, I dont think you need to add this line Load *,today() as DataField; every where, since Qlikview work with assosiation between the table so it automatically relates the table and reduce the table.You1l need to added in only one place.
For the sake of cheking i have added few tables to my application and its working as expected.
Chek the attached application and let me knowif this works in your case. User Name and password for opening the application is same .
USERID, PASSWORD
ADMIN, ADMIN
USER1, U1
USER2, U2
Hope this helps you.
-Sridhar
Many thanks Sridhar. You showed us how to do a good temporary restriction.
It would be great if the user could not change the system clock, because users always can change the system clock to another time and get guaranteed access to the document.
Anyways, thanks again Sridhar. You've been very helpful.
Regards, Marcel.
Marcel,Generally Reload happens on centralized server either by Qlikview Server or Qlikview Desktop version. So Qlikview captures the today's time from the Qlikview server (using QV back end script) and its stores internally. so if the user changes there system clock also it wont affect the application. until unless he has a reload previlogue(Generally user wont have reload privileges) .
- Sridhar