on 05-26-2017 3:41 PM
Hi All,
I have Data Access Profiles set up with 1 security dimension ("Cost Centre").
Users have access to selection of "Cost Centre" members, with some being "Read" and some being "Write". I think that's very typical and standard set up.
What I am struggling now is Input Templates. What I want to achieve is to restrict member selection via selection window (I use EPMContextMember formula) to Write members only. At the moment users see all members both Read and Write.
I had a go with filters (formula and member filter) using Owner hierarchy but that's no good because:
Is there a way to do it?
Thanks!
Sorry, but it's not possible... There is no way to effectively restrict users from selecting read only members.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Right! I got it working. The workaround is long and nasty but it does work.
Steps:
Private Sub Workbook_Open()
'Getting UserName value in a cell
to be used with Filter
Dim BPCUsername As String
BPCUsername =
Environ("Username")
Worksheets([sheet with table]).Range([specify
cell]).Value = BPCUsername
'refreshing workbook
to show correct (ones with access to ) members for the user
BPCA.RefreshActiveWorkBook
' filtering dimension
table using BPC Username (=Owner) value
Worksheets([sheet with
BPC table).Range([range of cells for your members]).AutoFilter Field:=5,
Criteria1:="=*" & BPCUsername & "*",
Operator:=xlAnd
' copy and paste as
values the list of members. This information will be used later in dynamic
dropdown list
Sheets([sheet with BPC table).Select
Range([range of cells for your members]).Select
Selection.Copy
Sheets([new blank sheet]).Select
Range("A1").Select
Selection.PasteSpecial
Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets([main sheet where you want your use
to be]).Select
End Sub
No the last thing to do is to create dynamic dropdown list:
The only challenge I have left is: Environ("Username") returns the "owner of the PC" value not the current BPC Username. In other words, when I have other users logged in to BPC on my station (logged in via Xls or BPC website, makes no difference), the value is still my username. It wont make any difference for my process (for me 1 PC = 1 user) but it'd be nice to get the value correct!
If anyone has an idea, please share!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There are a lot of other things that can be improved in your code....
For example you have a report with 3 columns:
ID OWNER DummyDATAColumn
Using API functions: GetDataTopLeftCell(Worksheet,ReportID) and GetDataBottomRightCell(Worksheet,ReportID)
You can calculate the range of first 2 columns.
Then you can read the range into array:
Dim varIDOWNERArr() as Variant
varIDOWNERArr = range(...)
Then loop this array to check for LIKE in the second column.
And don't use Copy Paste in VBA, use array assignment to range!
User | Count |
---|---|
15 | |
4 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.