This function returns true if the specified user belongs
to the specified User Group in the specified database.
This function is designed specifically to allow you
to check if there exists a valid connection between a user and a User
Group. The result of the function is displayed as a Boolean value.
If the user name that is specified in the function, is the user that
belongs to the specified User Group then the function returns "True"
If the user exists in the database but belongs to another group, in
this scenario when no relationship can be established between the
user and the group specified, then the function returns the value
which equals "False".
The function takes as a parameter the name of the
database with the required name for the User Group and the name of
the user which is being checked for belonging to that particular User
Group.
The function has the following syntax:
Syntax: OLAPUserInGroup
(database, group, user )
Explained below are the 3 parameters that have to
be provided when building this function.
- Database : Enter the name of the database which
has the User Group that you want to access / enter the cell reference
which has the name of this Database.
- Group : Enter the name of a user-group which
has users created for the purpose of security and these are the
users, within this group whose name you want to access want to
check the relationship between the user name and the group name
/ enter the cell reference which has the name of this group.
- User : Enter the name of a user for which you
want to ensure the relationship and existence within a User Group
whose name has been specified as the "Group" parameter
mentioned above / enter the cell reference which has such a user
name as its value.
Remarks
- If a connection is not established with a database
the result will be a #value.
- The User Group name and the user names must
exist within this database and they should be referenced by the
accurate and exact name.
- The user must exist in the database even if
it exists in another User Group.
- All arguments are compulsory and neither argument
is optional.
Example
This function may be easier to understand with an
example.
- In order to build this function with more ease,
open the specific database and bring a slice from that database
into Excel. In this way you will have connected to PowerOLAP because
you now have the OLAPOpen formula automatically on your sheet
when you bring a slice of the cube into Excel.
- In Excel, use the menu: Insert -> Function
and select PowerOLAP from the drop down list.
- Choose the OLAPUserInGroup function from the
list of functions provided and click "Ok".
- When building the formula enter the cell range
for the database name, the name of the User Group , and the name
of a user in the database. If you don't want to manually enter
the User name or the User Group name you can use the functions
called OLAPUser and OLAPGroup respectively in order to get this
value and then use that cell as a reference for a formula.
- In the following example B1 is the cell that
holds the database name, "UserGroup" is the name of
the group that contains the user names that the function accesses,
and the user name that has to be checked for existing in the current
group is called "Jack".
=OLAPUserInGroup($B$1,"UserGroup","Jack") |
The above formula returns a value = "True"
which signifies that "Jack" (who is the user specified under
the user parameter) does indeed belong to the group called "UserGroup"
which is the group specified here as the group parameter and which
exists in the database called "Acuity" (B1).