Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
vvira1316
Specialist II
Specialist II

How to have at least one value selected from mutlibox field on open of a QVW

Hi,

In following scenario I've a user having access to multiple profiles. When a QVW is loaded I'll like a multibox drop down with PROFILE field that has at least one of the available profile selected. Can you please advise how I can do that?

SECTION Access;
SECURITY:
LOAD
ACCESS,
NTNAME,
PROFILE,
AUTHORIZATION
FROM
[MBI_SECTION_ACCESS.xlsx]
(ooxml, embedded labels, table is SECURITY);

Section Application;

SHEET:
LOAD
PROFILE,
AUTH_KEY
FROM
[MBI_SECTION_ACCESS.xlsx]
(ooxml, embedded labels, table is SHEET);

Following is content of SHEET Excel worksheet. IT is a subset

ACCESS NTNAME PROFILE  AUTHORIZATION
ADMIN NTUSER1 PS_MANAGER AUTH_KEY
ADMIN NTUSER1 EH_MANAGER AUTH_KEY
ADMIN NTUSER1 LA_MANAGER AUTH_KEY
ADMIN NTUSER1 GLOBAL_MANAGER AUTH_KEY

2 Replies
qlikviewwizard
Master II
Master II

Hi,

Try Triggers from Document Properties as shown in screen. Hope this will help you.

Capture.PNG

vvira1316
Specialist II
Specialist II
Author

Hi,

I'm thankful for your response. That has not worked for me I had following logic.

Trigger for that field On Open, select in field PROFILE

=if(GetSelectedCount(PROFILE)=1,PROFILE,if(isnull(Only({$1}PROFILE)),vCurrentProfile,Only({$1}PROFILE)))

vCurrentProfile is as follows

=if(GetSelectedCount(PROFILE)=1,PROFILE,
if(GetSelectedCount(PROFILE)=0,(if(not IsNull(Only({$1}PROFILE)),Only({$1}PROFILE)))))

Following values are available. (first four manager values are valid, the user value is not associated but visible because of variable vProfile

   Profile2.JPG      Profile.JPG

vProfile is as follows

=If(vCurrentProfile='LA_MANAGER','LA Manager',
If(vCurrentProfile='LA_USER','LA User',
If(vCurrentProfile='EH_MANAGER','EH Manager',
If(vCurrentProfile='EH_USER','EH User',
If(vCurrentProfile='GLOBAL_MANAGER','Global Manager',
'Global User')))))))

Any ideas?