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]- Sort through date fields using IF...THEN...ELSE

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]- Sort through date fields using IF...THEN...ELSE
 Login/Join
 
Member
posted
My task was to populate one date field out of possible four fields that has a date and use the first one that has a date. I have to proceed through the 4 date fields in a certain order until i retrieve the first one that has data. If no fields are populated, then the report should generate/display n/a.

This message has been edited. Last edited by: Kort Thompson,
 
Posts: 11 | Registered: March 18, 2019Report This Post
Virtuoso
posted Hide Post
Basic If THEN ELSE in a DEFINE

But to know if the value is there or not you're the one who knows : you need to test the "missing" value assigned to the date field when it is not populated. Is it a Null (MISSING), a specific date (1900-01-01) or something else...


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
Thank you for your time. Can you give me an example of the if then else?
 
Posts: 11 | Registered: March 18, 2019Report This Post
Virtuoso
posted Hide Post
You've never done programming before isn't it ?

Assuming that your date fields are in YYMD format and since you want to have N/A displayed when the date is missing, must convert the date field into a text format where N/A can be displayed.
DEFINE FILE abc
NFLD /A10 = IF FLD1 NE 'MyMissingValue' THEN FPRINT(FLD1, 'YYMD', 'A10V')
       ELSE IF FLD2 NE 'MyMissingValue' THEN FPRINT(FLD2, 'YYMD', 'A10V')
       ELSE IF FLD3 NE 'MyMissingValue' THEN FPRINT(FLD3, 'YYMD', 'A10V')
       ELSE    'N/A';
END
TABLE FILE abc
PRINT …
BY NFLD
END
-RUN


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
Thank you, just started learning in March
 
Posts: 11 | Registered: March 18, 2019Report This Post
Master
posted Hide Post
quote:
using one of the following: TCDHTDT, TCDMMDT, TCDBHDT, OR TCDLADT.


I am unfamiliar with those. Can you explain?


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report This Post
Expert
posted Hide Post
Hi Kort,

When you have found or have been provided with a solution, just edit your first post and add [SOLVED] to the begining of the post heading. Leave the original text as is so that others searching for similar questions may be able to find your post and what the solution might have been.

Also, do not change any of your original message text, unless you want to add a note to say that it's solved.

I know that many different Forums have different methods but this is what this one does Smiler


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
Kort,

You must NOT replace the post title by [SOLVED] but ADD the key word in the subject.
Also as stated by Tony, do not remove your first post content, otherwise I would we know to what question the answers are for ?


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
Got it...i replaced the original post and the subject line. Thanks again for the assistance.
 
Posts: 11 | Registered: March 18, 2019Report 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]- Sort through date fields using IF...THEN...ELSE

Copyright © 1996-2020 Information Builders