Центральное ядро Section Access

SECTION Access;

/*----------- Taking only those users who has access to this app -----------*/

LET vDocumentName = Replace(DocumentName(),'.qvw','');

AppGroup:

LOAD APPGROUP,

ACCESSAPP

FROM

[\\10.0.100.27\QlikTech\QVProject\QVData\DataXls\SectionAccess.xlsx]

(ooxml, embedded labels, table is AppGroup)

Where ACCESSAPP = '$(vDocumentName)';

SectionAccess:

LOAD ACCESS,

NTNAME,

ACCESSGROUP

FROM

\\10.0.100.27\QlikTech\QVProject\QVData\DataXls\SectionAccess.xlsx

(ooxml, embedded labels, table is Access)

Where Exists(APPGROUP);

/*----------- Making access fields -----------*/

AccessGroup:

LOAD ACCESSGROUP,

ACCESSFIELD,

SubField(ACCESSVALUES,'|') as ACCESSVALUES

FROM

\\10.0.100.27\QlikTech\QVProject\QVData\DataXls\SectionAccess.xlsx

(ooxml, embedded labels, table is AccessGroup)

Where Exists(ACCESSGROUP);

For each vAccessField in FieldValueList('ACCESSFIELD')

TRACE Making of $(vAccessField) access;

[AccessGroup_$(vAccessField)]:

LOAD

ACCESSGROUP,

ACCESSVALUES as [$(vAccessField)]

Resident AccessGroup

Where ACCESSFIELD = '$(vAccessField)';

NEXT

DROP Tables AccessGroup,AppGroup;

SECTION Application;