Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld happening right now! You can still join: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Create third field based on values in 2 fields

Any help is appreciated.

I have Users and Documents.

Each User can be tied to one or more documents, which that user is allowed to view.

I have 5 documents named: AR, SA, IA, ED, CS

I have 3 users: Holden, Aaron, Brent

NTNAME, DocumentName

Holden,AR

Holden,SA

Holden,IA

Holden,ED

Holden,CS

Aaron,CS

Brent,AR

Brent,SA

Brent,IA

Brent,ED

The above data linking Users and Documents is in an existing QVD

There are three different ‘Types’ of users based on the groups of documents they are assigned.

Aaron would be a type of CS

Holden would be a type of BI + CS

Brent would be a type of BI

BI has access to at least one document but its not CS

CS has access to only CS

BI+CS has access to at least one non-CS doc as well as the CS doc.

How can I assign this ‘Type’ in script?

Create another field called type based on the above parameters?

Thanks

1 Solution

Accepted Solutions
passionate
Specialist
Specialist

Hi Aaron,

PFA solution.

The script seems big because we need to format data first.

The logic is pretty simple.

Regards,

Pankaj

View solution in original post

6 Replies
MarcoWedel

passionate
Specialist
Specialist

Hi Aaron,

PFA solution.

The script seems big because we need to format data first.

The logic is pretty simple.

Regards,

Pankaj

passionate
Specialist
Specialist

PFA, one more approach

balar025
Creator III
Creator III

You can try below script.

Section Access;

Security:

Load UPPER(NTNAME) as NTNAME,GROUP;

Load * Inline

[

NTNAME, GROUP

Holden, BI

Holden, CS

Aaron, CS

Brent, BI

];

Section Application;

SecurityGroup:

Load * Inline

[

GROUP,DocumentName

BI,AR

BI,SA

BI,IA

BI,ED

CS,CS

];

DocumentDetails:

Load * Inline

[

DocumentName,Value

AR,1

SA,2

IA,3

ED,4

CS,5

];

Not applicable
Author

Thanks!

Not applicable
Author

Thanks!