Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Selecting records only for Current Year

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Selecting records only for Current Year
 Login/Join
 
Silver Member
posted
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
 
Posts: 34 | Registered: August 30, 2012Report This Post
Expert
posted Hide Post
WHERE YEAR EQ '&DATEYY';


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Platinum Member
posted Hide Post
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
 
Posts: 195 | Location: Johannesburg, South Africa | Registered: September 13, 2008Report This Post
Platinum Member
posted Hide Post
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
 
Posts: 117 | Location: Denver | Registered: July 27, 2005Report This Post
Silver Member
posted Hide Post
"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. Good One


InfoAssist only - Version: 7703
Windows 7
Excel and PDF outputs
 
Posts: 34 | Registered: August 30, 2012Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Selecting records only for Current Year

Copyright © 1996-2020 Information Builders