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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Problems with Date
 Login/Join
 
<user198>
posted
Hello,

i have a problem with my dates. On my page I see "base period: TStart bis TStart" or "base period: WStart bis WEnde", etc., but I want the correct value of the date like "base period: 9/15/05 bis 9/18/05". I have tested it with EVAL but this also does not help...
Could you give me some help?

Thanks,

Katy


DEFINE FILE WG_VIEW_KD_PERFORMANCE
myDATUM/YYMD=HDATE(DATUM,'YYMD');
Ende/YYMD = '&&GLOBAL_DATE_TODAY_NOSPACE';
Start/YYMD = DATEADD('&&GLOBAL_DATE_TODAY_NOSPACE','D',-100);
-*aktueller Tag
TStart/YYMD = '&&GLOBAL_DATE_TODAY_NOSPACE';
-* aktuelle Woche
WEnde/YYMD = DATEADD(DATEMOV(Ende,'EOW'),'D',+2);
WStart/YYMD = DATEMOV(Ende,'BOW');
-* aktuelles Quartal
QEnde/YYMD = DATEMOV(Ende,'EOQ');
QStart/YYMD = DATEMOV(Ende,'BOQ');
-* aktueller Monat
MEnde/YYMD = DATEMOV(Ende,'EOM');
MStart/YYMD = DATEMOV(Ende,'BOM');
-* aktuelles Jahr
JEnde/YYMD = DATEMOV(Ende,'EOY');
JStart/YYMD = DATEMOV(Ende,'BOY');
-* vor Woche
VorWEnde/YYMD = DATEADD(DATEMOV(DATEADD(Ende,'D',-7),'EOW'),'D',+2);
VorWStart/YYMD = DATEMOV(DATEADD(Ende,'D',-7),'BOW');
-* vor Monat
VorMEnde/YYMD = DATEMOV(DATEADD(Ende,'M',-1),'EOM');
VorMStart/YYMD = DATEMOV(DATEADD(Ende,'M',-1),'BOM');
-* vor Quartal
VorQEnde/YYMD = DATEMOV(DATEADD(Ende,'M',-3),'EOQ');
VorQStart/YYMD = DATEMOV(DATEADD(Ende,'M',-3),'BOQ');
-* vor Jahr
VorJEnde/YYMD = DATEMOV(DATEADD(Ende,'Y',-1),'EOY');
VorJStart/YYMD = DATEMOV(DATEADD(Ende,'Y',-1),'BOY');
-* DEFINE END
END

-SET &S = IF &KZ EQ 'AW' THEN WStart ELSE
- IF &KZ EQ 'AT' THEN TStart ELSE
- IF &KZ EQ 'AM' THEN MStart ELSE
- IF &KZ EQ 'AQ' THEN QStart ELSE
- IF &KZ EQ 'AJ' THEN JStart ELSE
- IF &KZ EQ 'VW' THEN VorWStart ELSE
- IF &KZ EQ 'VM' THEN VorMStart ELSE
- IF &KZ EQ 'VQ' THEN VorQStart ELSE
- IF &KZ EQ 'VJ' THEN VorJStart;
-SET &E = IF &KZ EQ 'AW' THEN WEnde ELSE
- IF &KZ EQ 'AT' THEN TStart ELSE
- IF &KZ EQ 'AM' THEN MEnde ELSE
- IF &KZ EQ 'AQ' THEN QEnde ELSE
- IF &KZ EQ 'AJ' THEN JEnde ELSE
- IF &KZ EQ 'VW' THEN VorWEnde ELSE
- IF &KZ EQ 'VM' THEN VorMEnde ELSE
- IF &KZ EQ 'VQ' THEN VorQEnde ELSE
- IF &KZ EQ 'VJ' THEN VorJEnde;

-SET &S = IF &bzrvon EQ '' THEN &S ELSE EDIT(&bzrvon,'9999$99$99');
-SET &E = IF &bzrbis EQ '' THEN &E ELSE EDIT(&bzrbis,'9999$99$99');

-SET &BZR = 'base period: &S.EVAL bis &E.EVAL';
 
Report This Post
Expert
posted Hide Post
Katy,

It looks as if you are doing what most newcomers to WebFOCUS do, and that is expecting fiedl values to be avaiable in dialogue manager (DM) statements.


For info (basically): Any line begining with '-' is considered a DM line and will be executed before any DEFINE or TABLE request. This means that you cannot reference field values in DM but you can reference variables form DM in DEFINEs or TABLE requests.

To get your HEADING the way that I think you wnat it, change the last three lines of your code from -

-SET &S = IF &bzrvon EQ '' THEN &S ELSE EDIT(&bzrvon,'9999$99$99');
-SET &E = IF &bzrbis EQ '' THEN &E ELSE EDIT(&bzrbis,'9999$99$99');
-SET &BZR = 'base period: &S.EVAL bis &E.EVAL';
to
-SET &S = IF &bzrvon EQ '' THEN &S ELSE 'bzrvon';
-SET &E = IF &bzrbis EQ '' THEN &E ELSE 'bzrbis';
-SET &BZR = 'base period: <&S.EVAL bis <&E.EVAL';
you will also have to put the values of &bzrvon and &bzrbis into the DEFINEd fields bzrvon and bzrvis respectively.

Please note that I have only been able to check the evaluation of the BZR variable and not the actual output in a HEADING, but it should work Smiler

Good luck

Tony

This message has been edited. Last edited by: <Maryellen>,



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Platinum Member
posted Hide Post
If you are trying to output the values in a heading or footing could you perhaps use something like the following instead of setting additional DM variables:

HEADING
"base period: <WStart bis <WEnde"
 
Posts: 118 | Location: DC | Registered: May 13, 2005Report This Post
Expert
posted Hide Post
CM,

I think that is exactly what Katy wants to do, only the content changes depending upon the value of &KZ. Hence the numerous defines and DM!!
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Platinum Member
posted Hide Post
You are 100% right Tony. That's what I get for skimming! :-)
 
Posts: 118 | Location: DC | Registered: May 13, 2005Report This Post
<user198>
posted
Well, i just wanted to have the values in my heading. Sorry, if I did not explain it very well!
But thank you for your replies!

My code is now the following:

HEADING
" "
"team: &myteams base period: <&S bis <&E generation: &generation at &TOD.EVAL o`clock"
 
Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders