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
empty fields
 Login/Join
 
Virtuoso
posted
I'm building a fex that needs an address field.

The address is build out of several components (alphanumeric) which are sometimes empty.
We want a comma in between the componants, but if a field is empty, we now get two comma's.
How can we avoid that.




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
Virtuoso
posted Hide Post
A piece of code I have had for years:
  
-*N Shuffle sort addresses to strip out blank lines
    P_ADDRESS_1/A31  = IF P.ADDRESS_1 EQ ' '
                         THEN ' '
                         ELSE P.ADDRESS_1||',';
    P_ADDRESS_2/A31  = IF P.ADDRESS_2 EQ ' '
                         THEN ' '
                         ELSE P.ADDRESS_2||',';
    P_ADDRESS_3/A31  = IF P.ADDRESS_3 EQ ' '
                     THEN ' '
                         ELSE P.ADDRESS_3||',';
    P_TOWN     /A21  = IF P.TOWN EQ ' '
                     THEN ' '
                     ELSE P.TOWN||'~';
    P_COUNTRY  /A21  = IF P.COUNTRY EQ ' '
                         THEN ' '
                         ELSE P.COUNTRY||',';
    P_ADDRESS_PC/A16  = IF P.ADDRESS_PC EQ ' '
                         THEN ' '
                         ELSE P.ADDRESS_PC||',';
    P_ADDRESS_STR/A160= P_ADDRESS_1||
                        P_ADDRESS_2||
                        P_ADDRESS_3||
                        P_TOWN||
                        P_COUNTRY||
                        P_ADDRESS_PC;

A better way may be to concatenate them all with commas and use STRREP to replace 2 commas with one.

This message has been edited. Last edited by: Alan B,


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Virtuoso
posted Hide Post
As Alan says, define/computes is the way, on the STRREP I've never used it. Thanks Alan, for a new possiblility. We have to handle US and international addresses here at the university and use code similar to Alan's all the time.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders