Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Strict Exclusion and *

Hello all,

I have a sense of deja vu with this....

See this script:

star is *;

SECTION Access;
LOAD * INLINE [
DEPOT, ACCESS
3, ADMIN
];

SECTION Application;
Data:
LOAD * INLINE [
DEPOT, Name
1, Depot1
2, Depot2
3, Depot3
4, Depot4
5, Depot5
];

If I set the doc properties to use 'Initial Data Reduction...' and check 'Strict Exclusion', then this document when viewed thru the plugin will show only 'Depot3' which is correct. If I want the user to see all the depots, and I change the table in section access and replace the value 3 with a * which has been previously qualified, then the user is prohibited from entering the document. If I uncheck the 'Strict Exclusion' then the user gets to see all the depots.

I understand what is happening; with 'Strict Exclusion' off then as no values in the 'Data' table match then no reduction occurs (ie all data is shown). But I actually want the benefits of 'Strict Exclusion' whilst still allowing 'all' so that a user who matches a depot gets to see (only) that depot but if no there is no data for that specified depot then he is unable to access the document UNLESS his section access value corresponds to 'all depots' .

Any thoughts?

Gordon

v8.20

7 Replies
Not applicable
Author

An easy way it to add a DEPOT code = 'ALL' with all your depots in it...

SECTION Access;

LOAD * INLINE [

DEPOT, ACCESS

ALL, ADMIN

];

Then

SECTION Application;

Data:

LOAD * INLINE [

DEPOT, Name

1, xxxx

2, yyyy

ALL, xxxx

ALL, yyy

];

Then you can add the Code ALL in your section access table ?

Did you try also to set no value at all in the LOAD * INLINE SECTION such as:

SECTION Access;

LOAD * INLINE [

DEPOT, ACCESS

, ADMIN

)

Sebastien

Not applicable
Author

Thanks for the reply, Sebastien.

It does seem like * as used in section access is a problem for other than system fields (NTNAME etc) although I cannot find any evidence of that in the documentation.

The first solution you mention is a possibility, although as the data table is in real life dynamic rather than 'inline' it does mean the script would need to create an entry for 'ALL' against every value.

The second does not work as because there is no matching value in the 'section application' then access is prohibited.

I did change the code a little to convert the value of 'ALL' to * in 'section application':

star is 'ALL';

SECTION Access;
Access:
LOAD * INLINE [
DEPOT, ACCESS
ALL, ADMIN
];

SECTION Application;

LOAD DEPOT,
if (DEPOT = 'ALL', '*', DEPOT) as DEPOTX
RESIDENT Access;

Data:
LOAD * INLINE [
DEPOTX, Name
1, Depot1
2, Depot2
3, Depot3
4, Depot4
5, Depot5
];

This does see 'ALL' being treated as *, but because data in the 'Access' table has corresponding data in 'Section Application', this satisfies the condition for 'Strict Exclusion' so access to the document is never prohibited (for example if DEPOT in 'Access' had a value of 9)

Does seem rather a simple thing to want to achieve!

Regards,

Gordon

Not applicable
Author

Could you try with 0 value in the first access table ?

Besides, I would rather do like that:

Data:
LOAD * INLINE [
DEPOT_CODE, Name
1, Depot1
2, Depot2
3, Depot3
4, Depot4
5, Depot5
];

GROUPE_DEPOTS:

LOAD 'ALL' as DEPOT,DEPOT_CODE resident Data;

LOAD DEPOT, DEPOT_CODE resident Data;

I would create a king of group table between the section access table and the data table. Sorry I'm not very clear right now 😉

Not applicable
Author

Sebastien,

I agree that the best solution is to create a matrix as in your example.

Having done so I then realised that I actually do not like the way an authorised user who has no data to see is not allowed to open the document if 'Strict Exclusion' is checked! It seems more reasonable to me that he should be able to open the document and simply have no data to select from. So, I create a table in Section Application like this:

LOAD distinct DEPOT,
if (DEPOT='ALL', '*', DEPOT) as [Depot No]
RESIDENT [Access Control];

As this means a match between data in sections Access and Application the 'Strict Exclusion' data reduction property therefore has no affect at all. Another great side affect to this solution is that it forces a data reduction match - in a document that utilises 'Strict Exclusion' if this is unchecked and the user has no matching data then no data reduction occurs and the user sees all the data.

Thanks for your help on this.

Regards,

Gordon

Not applicable
Author

Good to hear Gordon,

You're welcome,

Rgds,

Sébastien

Not applicable
Author

Hello!

I was trying to do the same thing... and I discovered that the function:

Star is *;

Resolves this problem.

Kind Regards,

agigliotti
Partner - Champion
Partner - Champion

Yes but the STAR IS does not include NULL value.