Page 1 of 1

CellGetS fails to retrieve calculated string values

Posted: Wed Jul 18, 2012 4:34 pm
by Guillaume Galtier
Hi everybody,

I'm facing strange issues with CellGetS in a TI process.

When i'm trying to retrieve a String value using CellGetS from my TI, it returns empty string.
The value I want to retrieve is calculated by rule.

My model is very simple:
  • - 1 cube with 3 dimensions (Version, Dim1, Dim2).
    The third dimension (Dim2) contains Numeric and String elements.

    - 1 rule to calculate a version from another version
    • MyCalcVersion = N: MySourceVersion
      MyCalcVersion = S: MySourceVersion
    Feeders ar set, and Feedstrings statement is the first instruction of my rule.
From my TI, the CelGetS function works fine if I try to retrieve a value from MySourceVersion, but fails to retrieve values from MyCalcVersion (no errors, just returns empty string).
CellGetN works fine for the 2 versions.

Any idea why CellGetS fails to retrieve calculated string values ?

Thanks in advance ! :)
Guillaume

Re: CellGetS fails to retrieve calculated string values

Posted: Wed Jul 18, 2012 5:51 pm
by jim wood
I can only guess that it is a feeder issue. Have you tested your feeders on the cube where you are getting the value from?

Re: CellGetS fails to retrieve calculated string values

Posted: Wed Jul 18, 2012 7:45 pm
by David Usherwood
My guess is that you have written

Code: Select all

['MyCalcVersion'] = N: ['MySourceVersion'];
['MyCalcVersion'] = S: ['MySourceVersion'];
when you need to write

Code: Select all

['MyCalcVersion'] = N: ['MySourceVersion'];
['MyCalcVersion'] = S: db('MyCube','MySourceVersion',!Dim1,!Dim2);
You can't use ['...'] references to pick up string values.

Re: CellGetS fails to retrieve calculated string values

Posted: Wed Jul 18, 2012 10:31 pm
by Duncan P
Regardless of any other reason, the S: needs to be first. See http://www.tm1forum.com/viewtopic.php?t=7146.

Re: CellGetS fails to retrieve calculated string values

Posted: Thu Jul 19, 2012 7:42 am
by Guillaume Galtier
Thank you all for your replies !
David Usherwood wrote:My guess is that you have written

Code: Select all

['MyCalcVersion'] = N: ['MySourceVersion'];
['MyCalcVersion'] = S: ['MySourceVersion'];
when you need to write

Code: Select all

['MyCalcVersion'] = N: ['MySourceVersion'];
['MyCalcVersion'] = S: db('MyCube','MySourceVersion',!Dim1,!Dim2);
You can't use ['...'] references to pick up string values.
Sorry for the poor syntax of my rule, I just simplified it, writing my post.
I of course used ['..'] and the DB(...) to pick up string values.

I checked the Feeders, and it looks good.

I post hereunder my "true" rule and the associated feeders, it may help finding my issue... ;)

Code: Select all

# LIVE versions & Multi-Program versions
[] = N: IF(SUBST(!Version MSN, 4, 5) @= '_LIVE' % ELISANC('Version MSN', 'PPT', !Version MSN) = 1,
			DB('Assumptions MSN', ATTRS('Version MSN', !Version MSN, 'Link ' | ELPAR('MSN', !MSN, 1)), !MSN, !KF MSN),
			CONTINUE
		);

[] = S: IF(SUBST(!Version MSN, 4, 5) @= '_LIVE' % ELISANC('Version MSN', 'PPT', !Version MSN) = 1,
			DB('Assumptions MSN', ATTRS('Version MSN', !Version MSN, 'Link ' | ELPAR('MSN', !MSN, 1)), !MSN, !KF MSN),
			CONTINUE
		);

FEEDERS;

# Versions LIVE
# -- Last Closing Reference (PLA_LIVE)
[] => DB('Assumptions MSN', IF(!Version MSN @= ATTRS('Version MSN', 'PPA_LIVE', 'Link ' | ELPAR('MSN', !MSN, 1)), 'PPA_LIVE', 'No Feed'), !MSN, !KF MSN);

# -- Last Planning Reference (PLT_LIVE)
[] => DB('Assumptions MSN', IF(!Version MSN @= ATTRS('Version MSN', 'PPT_LIVE', 'Link ' | ELPAR('MSN', !MSN, 1)), 'PPT_LIVE', 'No Feed'), !MSN, !KF MSN);

# Versions Multi-Programs
[] => DB('Assumptions MSN', IF(SUBST(!Version MSN, 4, 5) @<> '_LIVE' & ELISANC('Version MSN', 'PPT', !Version MSN) = 0 & ELISANC('Version MSN', 'PPA', !Version MSN) = 0, 'PPT', 'No Feed'), !MSN, !KF MSN);


Re: CellGetS fails to retrieve calculated string values

Posted: Thu Jul 19, 2012 8:35 am
by Guillaume Galtier
Duncan P wrote:Regardless of any other reason, the S: needs to be first. See http://www.tm1forum.com/viewtopic.php?t=7146.
And the winner is Duncan !! :D

I've just inverted the N: and S: rules and now CellGetS in my TI process returns the good values.

Thank you !!

Guillaume