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.
I have 10 define fields which is of A20 format. Now i want to create a field which concatenate all 10 define fields.
The issue i have is when concatenating using the operand ||','|| i get continuous comma when a define field is empty. I tried using TRIM with LEADING , TRAILING and BOTH options,but how can i remove the commas in between.
When i have DEF1, DEF2 and DEF6 as empty i get the output like.
,,DEF3,DEF4,DEF5,,,DEF7,DEF8,DEF9,DEF10
If i use TRIM_(LEADING, ',', DEF1 || ','|| DEF2 ||','|| DEF3 ||','|| DEF4 ||','|| DEF5 ||','|| DEF6 ||','|| DEF7 ||','|| DEF8 ||','|| DEF9 || ','||DEF11 ) ,i can get rid of the first two commas.
But when i have commas between define outputs,TRIM won't help.
WF8206,Windows 7,8,10 HTM,PDF,EXCEL
Posts: 229 | Location: MI | Registered: September 13, 2017
The other option you have is to create an intermediate define field for each testing for blank, and either leaving as blank or adding the comma, then combine.
The other option you have is to create an intermediate define field for each testing for blank, and either leaving as blank or adding the comma, then combine.
Agreed. And then use the TRIM_ function to remove the trailing comma. Something like this:
DEFINE FILE master
DEF1/A4 = IF Field1 EQ '' THEN '' ELSE Field1 || ',';
DEF2/A4 = IF Field2 EQ '' THEN '' ELSE Field2 || ',';
DEF3/A4 = IF Field3 EQ '' THEN '' ELSE Field3 || ',';
DEF4/A4 = IF Field4 EQ '' THEN '' ELSE Field4 || ',';
DEF5/A4 = IF Field5 EQ '' THEN '' ELSE Field5 || ',';
DEF6/A4 = IF Field6 EQ '' THEN '' ELSE Field6 || ',';
DEF7/A4 = IF Field7 EQ '' THEN '' ELSE Field7 || ',';
DEF8/A4 = IF Field8 EQ '' THEN '' ELSE Field8 || ',';
DEF9/A4 = IF Field9 EQ '' THEN '' ELSE Field9 || ',';
CONCAT/50V = TRIM_(TRAILING, ',', DEF1||DEF2||DEF3||DEF4||DEF5||DEF6||DEF7||DEF8||DEF9);
END
Hallway
Prod: 8202M1
Test: 8202M4
Repository:
OS:
Outputs:
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015