Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using a custom property to filter data

Hi all,

     I'd like to define a custom property named "SalesOrder" and assign it to each user that is a Project Manager. The values allowed for this custom property are the SalesOrder number of projects that each PM is in charge of.

In a table inside the app, I'd like to filter values with an IF statement that check the values of this custom properties ... something like this:

If(SalesOrder=@SalesOrder, SalesOrder, null())

Where SaleseOrder is a field name and "@SalesOrder" is the custom property mentioned above.

... but this doesn't work ... am I wrong in something or it is absolutely not possible ?

Cordialement.

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

Custom properties are not available in the app script or expressions.  Their purpose is for aiding capability assignment in the security rules model of Qlik Sense, not for data reduction in an app.

You may want to have a look at Section Access for controlling visibility to data: Managing security with section access ‒ Qlik Sense

With Section Access, the availability of data to a user is handled automatically at login by Qlik.  Section Access is loaded as part of the load script where you bind a userid to a key field (in your case SalesOrder) within the application section of the load script.

Section Access load script can be created using inline statements or loading from a database.  In theory you could assign custom properties and then access the repository database or QRS to load the users and their custom property assignments but I do not recommend this.

jg

View solution in original post

4 Replies
Chanty4u
MVP
MVP

what error it is showng?

Did u try making single quotes?

If(SalesOrder= '@SalesOrder', SalesOrder, null())

Not applicable
Author

It doesn't gives me any error ... simply the result is a blank list, so I assume that the filter is not workinh.

I've tried also with the single quote as per your kind advice ... nope ... the result is the same unfortunately ...

So it is possible using a custom properties in an "if" statement into an app ... right ?

Chanty4u
MVP
MVP

did u chkd the  values seperatly  in tablebox?

@SalesOrder

SalesOrder

Not applicable
Author

Hi,

Custom properties are not available in the app script or expressions.  Their purpose is for aiding capability assignment in the security rules model of Qlik Sense, not for data reduction in an app.

You may want to have a look at Section Access for controlling visibility to data: Managing security with section access ‒ Qlik Sense

With Section Access, the availability of data to a user is handled automatically at login by Qlik.  Section Access is loaded as part of the load script where you bind a userid to a key field (in your case SalesOrder) within the application section of the load script.

Section Access load script can be created using inline statements or loading from a database.  In theory you could assign custom properties and then access the repository database or QRS to load the users and their custom property assignments but I do not recommend this.

jg