I have a tree prompt named PERIOD and it parameter ?PERIOD? based on an essbase period axis

this tree prompt PERIOD, according to a test made in a variable based on oracle tables must have two differents default values

the test is something like : [ORACLE_TABLE].[Current_Day]<[ORACLE_TABLE].[Reference_Day] in a cognos boolean variable

I created a conditionnal bloc which tests that variable

in each bloc I pasted a different PERIOD tree prompt with its specific default value according to the test

It means I had to double this PERIOD tree prompts now named PERIOD_YES and PERIOD_NO. Each prompt, unfortunately, with a different parameter name otherwise it oesn't work : ?PERIOD_A? is associated with the tree prompt PERIOD_YES and ?PERIOD_B? with the tree prompt PERIOD_NO. Whereas before, I had only one : ?PERIOD?

now the problem of course is that i'm using in my main queries and filters objects that were calling the former value of that unique prompt period : ?PERIOD?

so in order the whole thing works I had to double everything (pages, queries etc...) so that, where needed, the objects use either ?PERIOD_A? or ?PERIOD_B?

That method is working but it is very hard to maintain especially when reports are quite complictaed as those are.

So have you had experienced the same issues and how did you solve it :to resume my issue : you had an existing tree prompt with one default value and now your business is asking you to developp a new version of the report where the same tree prompt must have two different default value according to a test that is conductiong in an oracle table.

I thought that token may be a solution :#prompt('parameter','token',[MyEssbaseCube].[Period].[Period].[Periode : Total]->:[DO].[PER].[CN1M1P])#where "[MyEssbaseCube].[Period].[Period].[Periode : Total]->:[DO].[PER].[CN1M1P]" would be the default value corresponding to PERIOD_A but how to test that it must be PERIOD_A instead of PERIOD_B value.I'm confusing and lost, so please help ?

After 4 days of headache and folding cognos upside down I finally found a very simple and elegant solution to that problem. It's a tiny javascript that goes all along the tree and select any member on the tree where specified. The only drawback is that it can only select level 1 members. Hopefully in my cas, my two default members to be choosen are level 1.