Page 1 of 1

Picklist dependent of previous choice

Posted: Thu Mar 27, 2014 6:02 pm
by cbergen
I'm trying to develop a pick list that is dependent on the choices made on the previous level of the hierarchy and I'm having difficulties.

N Level Element Rules
['No01','Product']=S:('static:Red:Green');
['No02','Product']=S:('static:Violet:Purple');

1st Consolidation Level
['Lv1','Product']=S:(['static:['No01'Product']:['No02','Product']);

Now I know the 1st level consolidation level statement does not work but it expresses what I'm trying to do.

I need a pick list that will give a result that is equal to their selection from the n level options. Pick list should display Red or Violet, Green or Violet, Green or Purple, or Green and Violet - depending on the users selections on the n level.

Is this possible?

Thanks

Chris

Re: Picklist dependent of previous choice

Posted: Thu Mar 27, 2014 9:10 pm
by declanr
I am assuming the rules you have posted below are in a picklist cube and not just in the cube.

If that's the case to do a "dynamic" picklist; by which I mean one where your possible selections are dependent on something else not just one that is based on a dim or subset etc.

I have to admit though that with regards to your question I'm not sure how you would do it for different levels of a hierarchy, my understanding is that you have a consolidation with just 2 elements underneath, and you want that consolidation to give you a picklist showing the options provided from the elements below. If that's the case, the following code should probably work but the second that an extra element component is added into the consolidation it won't pick that up...

Code: Select all

['No01','Product']=S: 'static:Red:Green';
['No02','Product']=S:'static:Violet:Purple';

['Lv1','Product']=S: 'static:' | DB ( 'Cube', 'No01', 'Product' ) | ':' | DB ( 'Cube', 'No02', 'Product' );

That rule would be written in the picklist cube and it assumes that the cube it is based on is just 2 dims with the "Product" element being a string measure. All seems a bit irrelevant though due to the fact it won't work when extra components are added to the consolidation.



EDIT - Code amendment for a typo

Re: Picklist dependent of previous choice

Posted: Tue Apr 01, 2014 7:58 pm
by cbergen
Thanks for your help that worked great!!!! For what I'm doing two components is enough.

Thanks