#1 2016-11-08 15:32:14

bpeikes
Member
Registered: 2016-10-29

User Properties vs User variables

What are the different use cases for these two features? What cases would one use User Properties, and what cases would you use User variables?

Offline

#2 2016-11-08 18:08:55

jalbrecht
Administrator
Registered: 2016-10-21

Re: User Properties vs User variables

Hi bpeikes,

User Variables are used in the user tree to inherit values that reflect the users permission to access specific data rows. An Example:

1. Table all_company_data consists of all company data and a column deptno
2. User tree has two Levels Company and department an here dptno 1, 2, 3
3. a user_variable is created named u_deptno type list, the value is set to 1|2|3 on company node and the value is set the resp. deptno on deptno level (i.e. 1 if deptno is 1, ...)
4. A dynamic list named all_company_data is created based on the query SELECT * FROM all_company_data, the dynamic list has a paramter type user_variable named p_deptno. In the defining dialog of the parameter p_daptno, the user variable v_deptno is assigned

If you add now "where $X{dptno, IN , p_deptno}" to the query defining the dynamic list, the report shows different rows for users with different deptno's and all rows for users on the company level.

You could achieve the same result with a user property but you could not inherit values from company or group level to a user viy the user tree. User Variables work nicely with a user tree that reflects a given organizational Structure to seperate data rows whereas User Properties are part of the User Object and extend it. They can be accessed in scripts.

hope that helps

jan

Offline

#3 2016-11-08 19:02:39

bpeikes
Member
Registered: 2016-10-29

Re: User Properties vs User variables

Can you give an example of what someone would use "User Properties" for? Other than inheritance, I'm still not clear on the difference between User Properties and User variables.

Offline

Board footer

Powered by FluxBB