Page 1 of 1

How to get Parameter value based on contributor node access

Posted: Thu Aug 06, 2015 7:05 pm
by dharav
Hello all!

I would like to know how one can get parameter value based on user access to a node in the contributor. Purpose: I want to assign action button to a user where they can zero out the data or upload the data based on their access. Please let me know if you think so there could be another best practice. I have provided details below:

================================
#==Parameter
#===============================


pMetro='';
pVersion='Actual';


############################
## Logging Off
############################

OldCubeLogChanges = CUBEGETLOGCHANGES('InputData');
CUBESETLOGCHANGES('Inputdata', 0);



#############################
## Define Variable
#############################

Vcube='InputData';
Vtgt='Extract';
cDim1='3h_MetroHierarchy';
cDim2='3v_Version';

#############################
### View Create
#############################

If(viewexists(Vcube,vtgt)=1);
viewdestroy(vcube,vtgt);
Endif;

Viewcreate(Vcube,Vtgt);

#############################################
### Subset Create
#############################################

IF(SubsetExists(cDim1, sSub)=1);
SubsetDestroy(cDim1, sSub);
ENDIF;

Subsetcreate (cDim1, sSub);
SubsetElementInsert (cDim1 , sSub,pMetro, 1);

#############################################
### Subset Create
#############################################

IF(SubsetExists(cDim2, sSub)=1);
SubsetDestroy(cDim2, sSub);
ENDIF;

Subsetcreate (cDim2, sSub);
SubsetElementInsert (cDim2 , sSub,pVersion, 1);

#################################################################################
#### Assigning Subset to view
#################################################################################

Viewsubsetassign(VCube,Vtgt,cDim1,sSub);
Viewsubsetassign(VCube,Vtgt,cDim2,sSub);

ViewZeroOut(vCube,vTgt);

#======================================================================================================
# I want to achieve following results
#======================================================================================================


#pMetro='Should get value from node access';

Suppose
vElement='Value from node access' (? How to bring the node value based on user access to it)

IF (ELLEV(cDim1,vElement)=0);

v10= ELPAR (cDim1,vElement,1);


ELSEIF (ELLEV(cDim1,vElement)=1);

V10 = vElement;

Endif;

vMetro=v10
pMetro =vMetro;



Suppose, my approval hierarchy consists of
Total (Level 2)
=> NY (Level 1)
*NY1 (Level 0)
*NY2 (Level 0)
*NY3 (Level 0)

=> NJ (Level 1)
*NJ1 (Level 0)
*NJ2 (Level 0)
*NJ3 (Level 0)

IF any user select node NJ2 in the contributor than my pMetro should get value 'NJ' (the parent element value)
IF any user select node NJ in the contributor than my pMetro should get value 'NJ'

Is it possible? IF so, how could we achieve it? Is there any alternative way?

Purpose: Suppose, i assigned this process to user through action button.
Now when i write same process for zero-out than it would throw an error as user does not have access to all metro.
#================================================================================================================

Please feel free if further information required.

Thank You

Dharav Patel

Re: How to get Parameter value based on contributor node access

Posted: Thu Aug 06, 2015 7:12 pm
by declanr
An action button within "contributor" must be presented to the user within a websheet.
If you use SubNM formula within a websheet accessed from "contributor" that is based on the approval dimension then it will default to whatever element they have accessed; so you can just make the action button parameter dependent on the SubNM cell.

Re: How to get Parameter value based on contributor node access

Posted: Thu Aug 06, 2015 8:55 pm
by dharav
Thank You!!! declanr

Re: How to get Parameter value based on contributor node access

Posted: Wed Aug 12, 2015 8:16 pm
by dharav
Hello, Declnar
declanr wrote:An action button within "contributor" must be presented to the user within a websheet.
If you use SubNM formula within a websheet accessed from "contributor" that is based on the approval dimension then it will default to whatever element they have accessed; so you can just make the action button parameter dependent on the SubNM cell.
Just FYI:

I have created a web-sheet just to run TI processes. I created a cell based subset through subnm, change the text color to white, and uncheck the grid option so user should not able to see the parameter value. It worked great and still i am using contributor view instead of web-sheet cube view. User are just using web-sheet to run the TI processes. As work-flow gets changed in contributor, the subnm value is also getting changed in the web-sheet. TI process than takes the value of the subnm element and also gives the accurate results.

Thanks
Dharav