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     [CLOSED] Default parameter is a calculated date

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Default parameter is a calculated date
 Login/Join
 
Member
posted
Hi all,

I have used this in a fex but it doesn't work
-SET &DATVAN = AYMD (&YYMD, -7, 'I8YYMD');

-DEFAULT &DATUM_VAN_JJJJMMDD =&DATVAN.EVAL

TABLE FILE T_VISIT
\PRINT *
WHERE LASTCHANGE GE DT(&DATUM_VAN_JJJJMMDD);
END
-EXIT

By running this fex an error is trown :
0 ERROR AT OR NEAR LINE 7 IN PROCEDURE ADHOCRQ FOCEXEC *
(FOC177) INVALID DATE CONSTANT : &DATVAN.EVAL
(FOC009) INCOMPLETE REQUEST STATEMENT

Any help ?

This message has been edited. Last edited by: FP Mod Chuck,


WF 7.6.11
Windows, All Outputs
 
Posts: 5 | Registered: February 28, 2013Report This Post
Virtuoso
posted Hide Post
1. What's the format of LASTCHANGE?
2. Can you test your code by removing the .EVAL?
3. Are you really running 7.6?

This message has been edited. Last edited by: BabakNYC,


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Virtuoso
posted Hide Post
Everything should work except that I would use the SET variable, no need to re-assign to a DEFAULT one :
TABLE FILE T_VISIT
PRINT *
WHERE LASTCHANGE GE DT(&DATVAN);
END
-EXIT

Also, I don't know your metadata so maybe you could have an issue with LASTCHANGE date but I don't think that you will.

As per below, it should work :
SET &ECHO = ALL
-SET &DATVAN = AYMD (&YYMD, -7, 'I8YYMD');

TABLE FILE GGSALES
PRINT *
WHERE DATE LE DT(&DATVAN);
END
-RUN


P.S. : please try not to duplicate your post


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Member
posted Hide Post
Hi Babak,


Lastchange is a datetime field.
The fex runs on an oracle database.

Also without Eval it isn't working.

It seems that my version of Wf isn't up to date.
I'm using version 8.0.09.
sorry


WF 7.6.11
Windows, All Outputs
 
Posts: 5 | Registered: February 28, 2013Report This Post
Virtuoso
posted Hide Post
This works for me:
 
-SET &DATVAN = AYMD (&YYMD, -7, 'I8YYMD');

-DEFAULT &DATUM=&DATVAN.EVAL

-TYPE D=&DATVAN  H=&DATUM
 

This message has been edited. Last edited by: Danny-SRL,


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Member
posted Hide Post
we want to give the opportunity to enter a date to the user.
In case the user don't gives a specific date , a default date has to be used.


WF 7.6.11
Windows, All Outputs
 
Posts: 5 | Registered: February 28, 2013Report This Post
Expert
posted Hide Post
quote:
WF 7.6.11

I am not sure when the ability to assign a variable to a variable default became available. If you are on 7.6.11 as your signature implies then you might not be able to do this.

This ability was discussed a while ago now but you should be able to perform a search and find the thread.

T



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
Virtuoso
posted Hide Post
Nana,
This runs without a problem:
  
-SET &DATVAN = AYMD (&YYMD, -7, 'I8YYMD');
-DEFAULT &DATUM=&DATVAN.EVAL

TABLE FILE CAR
HEADING
"DEFAULT=&DATUM "
PRINT COUNTRY
END

Could it be your version of WF?


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Virtuoso
posted Hide Post
Are you using Auto Prompt or launching it with an HTML page?


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Virtuoso
posted Hide Post
I've test it under 7.7.05M and 8.1.05M and it works fine so you shouldn't have any issue under 8.0.0.9. (even if 8009 is not the best version...)

And since everyone of us test it under different versions, the issue may reside on your side.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Virtuoso
posted Hide Post
The problem is Nana wants to set a default value for the date field AND prompt for it so the user has a choice of entering something other than last week. However, I remember something about Auto Prompt not evaluating the -DEFAULT value and just displaying the variable name instead of the value for last week. If you turn off auto prompt the code will work (sans prompt), but if you have it on it doesn't.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Member
posted Hide Post
We are using autoprompt


WF 7.6.11
Windows, All Outputs
 
Posts: 5 | Registered: February 28, 2013Report This Post
Virtuoso
posted Hide Post
The following will work with auto-prompting (but no validation on entered date is performed, so personally I wouldn't use that option) :
-SET &DEFAULT_DATE = AYMD (&YYMD, -7, 'I8YYMD');
-SET &TEST_DATE    = IF &PROMPT_DATE EQ 'FOC_NONE' OR '_FOC_NULL' OR '' THEN &DEFAULT_DATE ELSE &PROMPT_DATE;

-TYPE DEFAULT_DATE: &DEFAULT_DATE, PROMPT_DATE: &PROMPT_DATE, TEST_DATE: &TEST_DATE


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Virtuoso
posted Hide Post
Hi

I believe I read that LASTCHANGE is a date time field and the &DATUM_VAN_JJJJMMDD is only being set to a YYMD format and not a full date and timestamp.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report 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     [CLOSED] Default parameter is a calculated date

Copyright © 1996-2020 Information Builders