I'm thinking this should be really simple, but... I want to schedule a report I've created to run for the current year's info. I've tried a few different forulas to return the current year, but can't seem to add them to the report filter successfully. I've tried using the Command Reference Help (http://documentation.informationbuilders.com/CommandRef/index.htm) to find the right formula, but in InfoAssist I'm getting errors and arguments if I try to create a Define, such as with the TODAY function. What's the simplest way to define or compute today's year and then filter the report by it? Right now I have a filter set that is literal - WHERE Year EQ 2013. I just want 2013 to change when we reach 2014.This message has been edited. Last edited by: <Kathryn Henning>,
InfoAssist only - Version: 7703 Windows 7 Excel and PDF outputs
Hi, As per Tom's example: There are a number of "system" amper variables available to you e.g. &DATEYY would show 2013 &YYMD would show 20131206 &MDYY would show 06122013
In InfoAssist these could be used in a DEFINE e.g. You could create a new DEFINE field with a format of I4, and make it equal to the value &DATEYY
Or, in InfoAssist, using the Advanced Filter option, specify &DATEYY as the constant value.
WebFOCUS 8.2.06 mostly Windows Server
December 06, 2013, 08:17 AM
Luiz De Assis
TRue,
Just create a define (format YY) that is equals to the amper variable &MDYY. For instance:
DEFINE CURYR/YY = &MDYY;
Then use it in the where statement: WHERE YEAR EQ CURYR
December 09, 2013, 06:09 PM
TRue
"Or, in InfoAssist, using the Advanced Filter option, specify &DATEYY as the constant value."
This worked. Thank you Twanette.
When I tried the define of CurrentyYear/YY = &MDYY I got an error message about an invalid date constant when I tried to save the new field. When I tried changing the &MDYY to &DATEYY I was able to save the new field and add it to my filter section -where AddedOn = CurrentYear. It didn't argue with me, but it produced no records when run.
Either way, thanks everyone, because I didn't know I could use amper variables in this very direct way. Handy.
InfoAssist only - Version: 7703 Windows 7 Excel and PDF outputs