Page 1 of 1

How to feed system time?

Posted: Thu Apr 28, 2011 3:04 am
by bunchukokoy
Hi Everyone!

Guys,

This is my first time to use rules in getting the system time. Here's my code:
skipcheck;

feedstrings;

['current date','system']=S:timst(now,'\m/\d/\Y');
['current month','system']=S:timst(now,'\M\Y');

['current quarter','system']=S:str(numbr(timst(now,'\Y'))+attrn('report month',timst(now,'\m'),'fiscal year'),4,0)|attrs('report month',timst(now,'\m'),'quarter');
['current mtd','system']=S:timst(now,'\m/\d/\Y')|' MTD';
['current ytd','system']=S:timst(now,'\m/\d/\Y')|' YTD';
['current fiscal year','system']=S:'FY '|str(numbr(timst(now,'\Y'))+attrn('report month',timst(now,'\m'),'fiscal year'),4,0);

feeders;
My problem is whenever I toggle the icon to suppress zeroes. It prompts No Values. Of course these cells should be fed. But I really don't have an idea.

Thanks for the help.

Bunch :D :D

Re: How to feed system time?

Posted: Thu Apr 28, 2011 3:26 am
by rkaif
One thing which I have noticed in your Rules is that the FEEDSTRING should be on the first line of the Rules file. So it should appear before SKIPCHECK.

Re: How to feed system time?

Posted: Thu Apr 28, 2011 3:28 am
by Gregor Koch
Hi

Agree with rkaif.

But, if the only reason for feeding is the zero suppression I would opt not to feed it at all and create a view that has all your system measures you need to see and not zero suppress the view.
Note that you don't need to feed these measures even if you want to use them in other calculations.
In addition to this, if these rules are on a two dimensional 'control' cube in which you have no need of consolidating any numbers, you could also consider not to use Skipcheck; and Feeders; at all.

Re: How to feed system time?

Posted: Thu Apr 28, 2011 3:33 am
by bunchukokoy
Wow!

Nice additional ideas. Thanks very much guys! :D

Bunch

Re: How to feed system time?

Posted: Thu Apr 28, 2011 5:09 am
by lotsaram
In my experience it doesn't matter is feedstrings is before or after skipcheck. The issue is that feeding has to start with real input data somewhere and in this cube you don't seem to have any. If you want to feed the values then create a data input cell (it could be string or numeric) and feed all your time measures from there.

But that's just a technical solution. As for a practical solution I agree with Gregor. For a small 2D system cube there is no need for skipcheck or feeders at all.