Websheet function: find the Group of a user

Post Reply
mnasra
Posts: 136
Joined: Tue Aug 10, 2010 5:40 pm
OLAP Product: Planning Analytics
Version: 2.0
Excel Version: EXCEL 2013

Websheet function: find the Group of a user

Post by mnasra »

Hi experts,

I need to change the color scheme of the Active Form based on user security. (grey if no access, white if access is permitted)
I can find the user (tm1user() function)
But the security is per group.
How Can I find which group this user belongs to?
thanks
PS: Maybe I am complicating something that is very simple
Thanks
Micheline
tomok
MVP
Posts: 2831
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Websheet function: find the Group of a user

Post by tomok »

The }ClientGroups cube.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
mnasra
Posts: 136
Joined: Tue Aug 10, 2010 5:40 pm
OLAP Product: Planning Analytics
Version: 2.0
Excel Version: EXCEL 2013

Re: Websheet function: find the Group of a user

Post by mnasra »

Thank you Tomok.
So the only way, is to look into the cube and see if the intersection between the user and the group is non empty?
I want to do it in a spreadsheet. it becomes a little cumbersome.
But yes, I can do it this way.

Micheline
Thanks
Micheline
tomok
MVP
Posts: 2831
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Websheet function: find the Group of a user

Post by tomok »

mnasra wrote: Fri Nov 16, 2018 10:57 pm Thank you Tomok.
So the only way, is to look into the cube and see if the intersection between the user and the group is non empty?
I want to do it in a spreadsheet. it becomes a little cumbersome.
But yes, I can do it this way.

Micheline
A zero-suppressed active form with }Clients as title dimension and }Groups as rows will list just the names of the groups the client is a member of.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
mnasra
Posts: 136
Joined: Tue Aug 10, 2010 5:40 pm
OLAP Product: Planning Analytics
Version: 2.0
Excel Version: EXCEL 2013

Re: Websheet function: find the Group of a user

Post by mnasra »

ok, i have to be more specific.

the websheets checks for which sec group the user belongs to, and applies color scheme. (grey if read, white if write).
this works perfectly for all users, except one, because he belongs to 2 different groups.
I dont know how to resolve that. it works for him for group 1, but not the second.
any idea is more than welcome.
Thanks
Micheline
Wim Gielis
MVP
Posts: 3105
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Websheet function: find the Group of a user

Post by Wim Gielis »

Can you still be more specific ? How do you check the rights by group ? Do you use some kind of lookup table with a selection of groups and their associated rights ?
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Mark RMBC
Community Contributor
Posts: 292
Joined: Tue Sep 06, 2016 7:55 am
OLAP Product: TM1
Version: 10.1.1
Excel Version: Excel 2010

Re: Websheet function: find the Group of a user

Post by Mark RMBC »

Hi,

Unless you have a million and one groups not sure why adding a simple if statement to the websheet wouldn't be the easiest way of doing this? And the colour format references the cell where the if statement is.

Lots of other ways to do this but another relatively simple alternative:

create an attribute against the client dimension and use a tI process with all relevant logic to populate the attribute as required (chore daily or something), so 0 and 1 for example. Then on the websheet use the attribute value to determine the colour format.
mnasra
Posts: 136
Joined: Tue Aug 10, 2010 5:40 pm
OLAP Product: Planning Analytics
Version: 2.0
Excel Version: EXCEL 2013

Re: Websheet function: find the Group of a user

Post by mnasra »

You are absolutely right Mark. I only have 5 groups, and I have an if statement in my worksheet which reads each group for my user and tests if it is empty or not.
My problem, is the one user who belongs to 2 groups. my if statement stops as soon as I get the group.

the 'temporary' solution I found, is to have 2 columns in the websheet for the each group the user belongs to. And another IF statement testing the accesses (write read none ).
It is NOT pretty, but I think it does the trick for now!
Thanks
Micheline
Post Reply