Create parameter process using none datasource

BariAbdul
Regular Participant
Posts: 424
Joined: Sat Mar 10, 2012 1:03 pm
OLAP Product: IBM TM1, Planning Analytics, P
Version: PAW 2.0.8
Excel Version: 2019

Re: Create parameter process using none datasource

Post by BariAbdul »

Did you change

Code: Select all

ViewExtractSkipRuleValuesSet('Input Accomodation and Transportation', 'View 1', 1);
in prolog as suggested by Declan.
Aslo,Did you try below as suggested by Alan
Also, as an alternative did you try restoring the CellIsUpdateable test? Because it isn't there in your code.
"You Never Fail Until You Stop Trying......"
Alan Kirk
Site Admin
Posts: 6667
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: Create parameter process using none datasource

Post by Alan Kirk »

Chita wrote:When i make this rule in my view which is the numeric value :

IF

( CELLISUPDATEABLE ( 'Input Accomodation and Transportation', vYear, vOrganizationUnit,P1, vNumber, vMeasure) =1 );
CELLPUTN(NValue, 'Input Accomodation and Transportation', vYear, vOrganizationUnit,P1, vNumber, vMeasure);

ENDIF;

The process running succesfully in rule coloumn but not when i use this :

IF

( VALUE_IS_STRING =1 );
CELLPUTS(SValue, 'Input Accomodation and Transportation', vYear, vOrganizationUnit,P1, vNumber, vMeasure);
ELSE;
CELLPUTN(NValue, 'Input Accomodation and Transportation', vYear, vOrganizationUnit,P1, vNumber, vMeasure);

ENDIF;

The message :
Error "Rule applies to cell"

Which part of my tab data rule that should i fix .. ????
I am not sure which part of this:
I wrote:One is to reinstate the cellsupdateable test that you took out with your last code update (that is to say, you use both the CellIsUpdateable and the VALUE_IS_STRING test).
is unclear, but I have enhanced the emphasis.

As others (and I) have mentioned, the ideal situation is to fix your data source so that you are not pulling in rules calculated values in the first place. There is of course one proviso to that; it will only work if your rules are consistent between versions so that the combinations which are rules in the source are also rules in the target, and vice versa. Since we have never seen your rules that may or may not be the case.

But if you don't do that, or if you can't do that for the reason given above, then you need to test in the data tab and you do it using both (not one, not the other, BOTH) tests. Something like this:

Code: Select all

If( CellIsUpdateable ( Cube and elements...) =1 );
    If ( VALUE_IS_STRING =1 );
         CellPutS( SVALUE, Cube and elements...);
    Else;
         CellPutN( NVALUE, Cube and elements...);        
    EndIf;
EndIf;
The outer CellIsUpdateable If block will determine whether there is any point trying to write at all.

If there is (which is to say, the cell is updateable) then the inner If block will determine whether to write a string, or a numeric value.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
Chita
Posts: 16
Joined: Tue Jun 02, 2015 5:46 am
OLAP Product: Oracle
Version: 10.2.1
Excel Version: 2007

Re: Create parameter process using none datasource

Post by Chita »

Thank you soo much Alan for your help. :D It's works !!

But i still need something . I've make the rule in my prolog tab like this which is make the new view. But i didn't need the new view. I don't understand how to remake my formula to copy element value without make the new view . Note : P0 is the source element and P1 is the element that i want to put the value

#*******************************************************************************
# Delete the View and the Subset used to empty the targeted cells
#*******************************************************************************

IF
(VIEWEXISTS ('Input Accomodation and Transportation', 'Emptyview')=1);
VIEWDESTROY ('Input Accomodation and Transportation', 'Emptyview');
ENDIF;

IF
(SUBSETEXISTS ('Scenario', 'Emptysubset2')=1 );
SUBSETDESTROY ('Scenario', 'Emptysubset2');
ENDIF;

#*******************************************************************************
# Create the View and the Subset used to empty the targeted cells
#*******************************************************************************

VIEWCREATE ( 'Input Accomodation and Transportation', 'Emptyview' );
SUBSETCREATE ( 'Scenario', 'Emptysubset2');
SUBSETELEMENTINSERT ( 'Scenario', 'Emptysubset2', P1, 1);
VIEWSUBSETASSIGN ( 'Input Accomodation and Transportation', 'Emptyview', 'Scenario', 'Emptysubset2');

#*******************************************************************************
# Empty the targeted cells
#*******************************************************************************

VIEWZEROOUT ('Input Accomodation and Transportation', 'Emptyview');

#*******************************************************************************
# Create the View and the Subset used to empty the targeted cells
#*******************************************************************************

IF
( VIEWEXISTS ('Input Accomodation and Transportation', 'Fromversion')=1 );
VIEWDESTROY ('Input Accomodation and Transportation', 'Fromversion');
ENDIF;

VIEWCREATE ('Input Accomodation and Transportation', 'Fromversion');

IF
(SUBSETEXISTS ('Scenario', 'Fromsubset2')=1 );
SUBSETDESTROY ('Scenario', 'Fromsubset2');
ENDIF;

#*******************************************************************************
# Create the View and the Subset used to empty the targeted cells
#*******************************************************************************

SUBSETCREATE ('Scenario', 'Fromsubset2' );

SUBSETELEMENTINSERT ('Scenario', 'Fromsubset2', P0, 1);

VIEWSUBSETASSIGN ('Input Accomodation and Transportation', 'Fromversion', 'Scenario', 'Fromsubset2');

---------------------------------------------------------------------------------------------------------------------------------



Thanks & Regards,

Chita
Post Reply