Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
fionna51
Creator
Creator

Search value from reference table

Hi,

I want to show one critical object only to certain users. I can get user's Entity_ID when user login (unique for every user) . Also, I load an island reference table which contains list of eligible entity IDs who can see this object, field name Eligible_ID.

In this object Layout tab, how should I write the condition?

4 Replies
marcus_sommer

You could use osuser() for this, like:

match(osuser(), '$(=concat(YourUserlistField, chr(39) & ',' & chr(39)))')

but if your data/objects are really confidential then you should consider to use Section Access.

- Marcus

fionna51
Creator
Creator
Author

Hi Marcus,

My Entity_ID was derived from user_id, the data type is exactly same as Eligible_ID in my reference list. But if I use:

match(Entity_ID, Eligible_ID), it won't work. One user only has one Entity_ID value, but Eligible_Id is a list of values.

Thanks a lot.

marcus_sommer

My Entity_ID was derived from user_id

isn't quite clear to me - from where come these values. For reading the current user there are only two functions: osuser() and qvuser().

The concat-function within $-sign expansion will return a list from your user-table - therefore try:

match(osuser(), '$(=concat(Eligible_ID, chr(39) & ',' & chr(39)))')

further you should check if the osuser() returned the same user like in your user-table - you might need to adjust upper/lower chars and also the domain\user.

- Marcus

fionna51
Creator
Creator
Author

We have built section access with security_key, then can use substring() to get proper segment for user's entity. One user can only have one entity, for example hospital Stony Brook. Also we have a list contains eligible entities. Only hospital in this list can see the object.

Thanks.