Page 1 of 1

Limit Scope in Feeder?

Posted: Thu Nov 05, 2009 6:44 pm
by image2x
I'd like to only have feeders statements apply to specific versions as determined by an attribute lookup.

In the Rule area, I do this with something like:
# Skip All Other Non-Budget Versions… Version references after this point will only relate to budget versions
[ ] = N: IF ( db ( 'ControlCube' , !Version, 'Dynamic' ) @= '' , STET, Continue ) ;

But I can't figure out an equilvalent scope limitation for the Feeder area. STET and Continue are not valid in feeder blocks, correct? I know that you can effectively do a STET in a feeder by using a db('',...) for a cube name, but then I believe TM1 expects to perform an actual feeder for the other "IF" condition. As it's a match all on the left side, I believe this would effectively negate processing any further feeders?

[edit: upon further reflection, i guess I could have an If attribute check on the right side of every feeder line.]

Thanks in advance,
-- John

Re: Limit Scope in Feeder?

Posted: Thu Nov 05, 2009 7:59 pm
by David Usherwood
Something on the lines of

[] => DB(
IF ( db ( 'ControlCube' , !Version, 'Dynamic' ) @= '',
'ThisCube',
#else
''),
<!Rest of dims>)
;

Is what you need. Conditional feeders are (in my view) pretty essential to manage a modelling application, even in 64 bit.

Re: Limit Scope in Feeder?

Posted: Thu Nov 05, 2009 8:33 pm
by image2x
Thanks Dave... not sure I'm following your suggestion however...

Would I need to have the conditional logic on each and every feeder line or can I accomplish the goal with a single line as can be done in the rule area?

Re: Limit Scope in Feeder?

Posted: Fri Nov 06, 2009 11:09 am
by David Usherwood
You've raised a good point.
With rules, the first rule found to apply is used. Feeders don't work that way - sequence is irrelevant. So yes, if you wanted _all_ your feeders to be conditional, you'd have to do it to all of them. Messy I agree. However it's usually possible to identify which feeders take the most space and conditionalise them. For instance, I'm building a set of insurance models at present, where I need to feed data 'down the diagonal' to the next model point and age. That creates a feeder chain, so I conditionalise it. The 'Commission = Amount * Rate' rules I don't bother with.