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] Concatenated Alpha and Date In a Define

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Concatenated Alpha and Date In a Define
 Login/Join
 
Platinum Member
posted
I've got a define that I'm trying to build based on the values in other fields.

The "CUSTOMER_APPROVAL_DEADLINE" is a MDYY field.

The "REQUEST_STATUS" is a A100 field

What I'm trying to do is:

If there is no value for "CUSTOMER_APPROVAL_DEADLINE", then return a " | " character string, and the "REQUEST_STATUS" field value concatenated to it:

| Awaiting Functional Review

If there is value for "CUSTOMER_APPROVAL_DEADLINE", then return a " | CD: " character string, and the "CUSTOMER_APPROVAL_DEADLINE" field value concatenated to it:

| CD: 03/23/09 | Awaiting Customer Approval

When I run the code below, I get an error that "(FOC282) RESULT OF EXPRESSION IS NOT COMPATIBLE WITH THE FORMAT OF FIELD: CUSTAPPDT4"

Does anyone know how to concatenate a define and a field in a define?


My code:

DEFINE FILE WORKLOAD
DELIM_XX/A3= ' | ';
DELIM_CD/A7= ' | CD: ';
CUSTAPPDT4/A255=IF CUSTOMER_APPROVAL_DEADLINE EQ '' THEN DELIM_XX | REQUEST_STATUS ELSE DELIM_CD | CUSTOMER_APPROVAL_DEADLINE;
END


TABLE FILE WORKLOAD
PRINT
CUSTAPPDT4 AS ''

ON TABLE PCHOLD FORMAT HTML
END

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


Production - 7.6.4
Sandbox - 7.6.4
 
Posts: 241 | Location: Bethesda, MD | Registered: August 14, 2007Report This Post
Virtuoso
posted Hide Post
CWM,

1. If you want to concatenate all fields must be alpha.
2. If there is no value for CUSTOMER_APPROVAL_DEADLINE then either it is 0 or it is null, depending on how it is defined.

So:
  
DEFINE FILE WORKLOAD
DELIM_XX/A3= ' | ';
DELIM_CD/A7= ' | CD: ';
CAD/A8DMYY=CUSTOMER_APPROVAL_DEADLINE;
CUSTAPPDT4/A255=IF CUSTOMER_APPROVAL_DEADLINE EQ 0
   THEN DELIM_XX | REQUEST_STATUS
   ELSE DELIM_CD | CAD;
END



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
Platinum Member
posted Hide Post
Thank you Danny.

This is what wound up working:

DEFINE FILE WORKLOAD
DELIM_CD/A7= ' | CD: ';
DELIM_XX/A3= ' | ';
CUSTAPPDT0/A8MDYY=WORKLOAD.CUSTOMER_APPROVAL_DEADLINE;
CUSTAPPDT1/A500=IF WORKLOAD.CUSTOMER_APPROVAL_DEADLINE EQ '' 
     THEN DELIM_XX | WORKLOAD.REQUEST_STATUS 
     ELSE DELIM_CD | EDIT(CUSTAPPDT0,'99/99/9999');
END

TABLE FILE WORKLOAD
PRINT
CUSTAPPDT1 AS ''

ON TABLE PCHOLD FORMAT HTML
END



Production - 7.6.4
Sandbox - 7.6.4
 
Posts: 241 | Location: Bethesda, MD | Registered: August 14, 2007Report 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] Concatenated Alpha and Date In a Define

Copyright © 1996-2020 Information Builders