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] the syntax for an IF then using the define field creator in advanced graph

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] the syntax for an IF then using the define field creator in advanced graph
 Login/Join
 
Gold member
posted
The syntax in the define field GUI's seem to leave me stumped . I am in Advanced graph Assistant and I want to assign numbers to my week days so I can sort them properly. I have entered :

IF UM_PEND_DIS_DTL.UTIL_PENDING_DISCH_DTL.WKDAY EQ '' Sunday '' THEN 1 else 0

and I am getting back a syntax error message . Can anyone tell me what the syntax should be ?

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


8002 Windows
 
Posts: 50 | Registered: May 21, 2012Report This Post
Platinum Member
posted Hide Post
Try single quotes and a semi-colon terminator.


WF 7.7.04, WF 8.0.7, Win7, Win8, Linux, UNIX, Excel, PDF
 
Posts: 175 | Location: Pomona, NY | Registered: August 06, 2003Report This Post
Gold member
posted Hide Post
Thanks the single quotes fixed it!!


8002 Windows
 
Posts: 50 | Registered: May 21, 2012Report This Post
Virtuoso
posted Hide Post
Is this a DATEFIELD or a string?
If it a date then it has already an internal sequence number. Else use the decode function.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Gold member
posted Hide Post
It is a string that shows the day name. What is decode and what does it do?


8002 Windows
 
Posts: 50 | Registered: May 21, 2012Report This Post
Platinum Member
posted Hide Post
Decode is a function that converts whatever is coming from your source to your specifies value.

DECODE fieldname(code1 result1 code2 result2...[ELSE default ]);

DECODE DAYNAMES(Sunday 1 Monday 2 etc ELSE 0);


WF 7.7.04, WF 8.0.7, Win7, Win8, Linux, UNIX, Excel, PDF
 
Posts: 175 | Location: Pomona, NY | Registered: August 06, 2003Report This Post
Gold member
posted Hide Post
Thanks Alex that is very cool. It will meet my needs better than an if.

I did finally get the IF syntax to work ( limited) it should have been

IF UM_PEND_DIS_DTL.UTIL_PENDING_DISCH_DTL.WKDAY EQ 'Sunday' THEN 1 else 0


8002 Windows
 
Posts: 50 | Registered: May 21, 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] the syntax for an IF then using the define field creator in advanced graph

Copyright © 1996-2020 Information Builders