Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to force users to select and select only one value from the List Box?

Hi all,

I've created one list box with all companies available but want to:

  1. Ensure that no one can select more than one company. I've tried to check the LB propertie 'Always one selected value' but when I clear all selections this is automatically lost. I want to set a message to users about it.
  2. It is also strange why the Year LB is not cleared when Clear all is asctivated.
  3. Ensure appropriate people have access to only their companies. I've created a list of companies and OSUsers. How do I evaluate this?

I'm using QV 9 SR3.

Thanks in advance,

Neno

1 Solution

Accepted Solutions
Not applicable
Author

Thanks Stefan.

CO(User...) mean a list of users with permisions to access specific company data, a sub-set, in a single qvw.

I'll check the file you suggested.

Thx again.

Regards,

Neno

View solution in original post

6 Replies
Not applicable
Author

FYI

1. In the meantime I've sorted it out thanks to NMiller. That property does not work for expressions so I used a Trigger, set up an OnSelect Action, choose Select in a Field, choose my Field, and for the Select I used: =SubField(GetFieldSelections(MyField), ',', 1). That will select only the first of multiple selections and in addition I've locked that one selection.

2. It is not cleared as the propertie 'Always one selected value' works fine for plain fields.

3. Still looking the best solution...

swuehl
MVP
MVP

Hi NV,

1) and 2)

I checked in QV9 SR6:

if I create a lis box, select one value, then go to properties, check option "always one selected value", there is always one and only one selected value in this list box. I tried clearing selection by buttom from desktop client menu and per trigger action - one value still selected.

So where do you activate Clear all?

(It might be again a good idea to share an example, since I can't reproduce, maybe you can share an app?)

3) Have you looked into "section access" (query the forum and/or the HELP)?  I think there is even an Access restriction table wizard available from the script dialog.

Regards,

Stefan

P.S: Just saw your second post, so you may want to jump into 3) directly

edited

Not applicable
Author

Hi Stefan,

1. Yes, this works if you have a single field in the listbox, but if you have smething like this: FieldA&'-'&FieldB&'-'&FieldC this does not work.

3. I know this exists, but I need a kind of sub-access in one qvw. I need to restrict some users from accessing details of other users' data, i.e. they can access only theri data. This should be connected to the first LB. For example:

CO1 (User1, User2, User3)

CO2 (User1, User4)

CO3 (User1, User5, User6)

I don't know how to manage this on the front-end as all data are loaded for all companies.

This is my first QV so I appologize for maybe posting "silly" questions. As I've years and years of experience in programming languages I'll catch up and apply ideas quickly. I hope

Regards

swuehl
MVP
MVP

Hi NV,

keep going, I think you make good progress...

I don't understand the lines with CO(User...). What does this mean?

Regarding the section access, are you aware of that section acces can be combined with data reduction?

So not only restricting access to the qvw, but also to certain selections of fields?

Regards,

Stefan

swuehl
MVP
MVP

If you are not aware of all section access features, maybe this is a good starting point:

http://community.qlik.com/docs/DOC-1853

Not applicable
Author

Thanks Stefan.

CO(User...) mean a list of users with permisions to access specific company data, a sub-set, in a single qvw.

I'll check the file you suggested.

Thx again.

Regards,

Neno