Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Check a list for a specific value

Hi all. A simple question I think...

I need to be able to check a field to see if any of the values match the user.

EG if OSuser() is in field [Priority A users], yes, no.

It sounds simple to check a list for a value but I can't do it.

Any ideas.

Many thanks

David

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi David,

Its better to create a variable which has the value of current user logged in.

For example vuser=OSuser()

And you can use this variable anywhere in your report.

Thanks and Regards,
Laxmi

View solution in original post

5 Replies
SunilChauhan
Champion
Champion

if(exists( [Priority A users],Osuser()),'Yes','No')

fro example

if(exists( [Priority A users],domein\username,'Yes','No')

hope this helps

Sunil Chauhan
Anonymous
Not applicable
Author

Hi, thanks for that but it doesn't seem to work. I need to be able to use this logic in the "front end" and not in the script. The function "exists" is not something I have available to use in say a text box.

Any ideas for how to achieve this in a text box? Each user who looks at the system needs to be verified (I'm try to keep away from section access if I can).

Thanks

Anonymous
Not applicable
Author

Hi David,

Its better to create a variable which has the value of current user logged in.

For example vuser=OSuser()

And you can use this variable anywhere in your report.

Thanks and Regards,
Laxmi

Anonymous
Not applicable
Author

Many thanks, yes that does the trick.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

If(Count({1<[Priority A users] ={'$(=OSUSER())'}>} [Priority A users]) > 0, 'Yes', 'No')

Hope this helps you.

Regards,

Jagan.