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     (CLOSED) Concatenation

Read-Only Read-Only Topic
Go
Search
Notify
Tools
(CLOSED) Concatenation
 Login/Join
 
Member
posted
Does anyone know if I can concatenate sales order number and sales order line number with "/" as separator, in "Detail Defined" window as shown below?

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


Production WF 8.1, Test WF 8.2
Windows
HTML 5
 
Posts: 28 | Registered: October 11, 2017Report This Post
Silver Member
posted Hide Post
As I understand it, if they both aren't strings (Alpha) data types you need to do a conversion and use the converted field in place.

Can't concatenate a number with a text value from my experience.


Production: WebFOCUS 8.202M
QA: WebFOCUS 8.206.01
Windows/SQL
 
Posts: 37 | Registered: May 24, 2017Report This Post
Member
posted Hide Post
Hi Ryan,
they both are text fields in file.


Production WF 8.1, Test WF 8.2
Windows
HTML 5
 
Posts: 28 | Registered: October 11, 2017Report This Post
Silver Member
posted Hide Post
Ah in that case yeah should be simple:


FIELD1 | '/' | FIELD2

If you are using spaces in the '/' then i think you need a || double pipe.


Production: WebFOCUS 8.202M
QA: WebFOCUS 8.206.01
Windows/SQL
 
Posts: 37 | Registered: May 24, 2017Report This Post
Master
posted Hide Post
your concatenation characters in WF are | and ||

here is what the help says:

quote:
Concatenating Character Strings
You can write an expression to concatenate several alphanumeric and/or text values into a single character string. The concatenation operator takes one of two forms, as shown in the following table:


| Weak concatenation.
Preserves trailing spaces.

|| Strong concatenation.
Suppresses trailing spaces.



Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Member
posted Hide Post
I followed both your advices, got below error message. I think Ryan is correct that one of the fields is numeric.
Now I have to figure out how to convert the numeric to text field Frowner


Production WF 8.1, Test WF 8.2
Windows
HTML 5
 
Posts: 28 | Registered: October 11, 2017Report This Post
Expert
posted Hide Post
Use something like this -
COMPUTE yourfield/Ann = LJUST([length],FPRINT([numerical field],[usage format],[output format]),[output format]) || '/' || [your alpha field];

e.g.

COMPUTE mystring/A35 = LJUST(9,FPRINT(value,'I9','A9'),'A9') || '/' || textfield;


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
Member
posted Hide Post
Hi Tony,
I assume that I can't implement your suggestion in the "Detail Define" window? It needs to be done in coding?


Production WF 8.1, Test WF 8.2
Windows
HTML 5
 
Posts: 28 | Registered: October 11, 2017Report This Post
Virtuoso
posted Hide Post
quote:
I assume that I can't implement your suggestion in the "Detail Define" window? It needs to be done in coding?

In the "Define Detail" Window you can type in what you want. It is not mandatory to click and choose.
you even have a Function tab (or button) from where to choose IB functions


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
Expert
posted Hide Post
quote:
It needs to be done in coding?

Not really. You can click the various components if you wish to, but nested functions can sometimes be a little "trying", so it is mostly easier to type the code in as Martin suggests.

Of course, typing in the code does require knowledge of what you are typing so it may be easier for you to create a define (or compute) for the inner nested function (the FPRINT) using the GUI "clicks" and then utilise that define (or compute) within another define (or compute) as one of the arguments for the outer function (the LJUST).

Of course, old hacks like me baulk at that because we know that we can type in the nested functions easier than spending some time clicking around the GUI, but then that probably covers a rather large number of contributors here! Wink

Good luck

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
Member
posted Hide Post
I did see the Function tab, Martin. Thank you. Just need to learn to use it.

Thank you both Tony and Martin!

What is GUI? I see this terminology being used a lot.


Production WF 8.1, Test WF 8.2
Windows
HTML 5
 
Posts: 28 | Registered: October 11, 2017Report This Post
Virtuoso
posted Hide Post
Stands for "Graphical User Interface" and is pronounced "gooey."
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Member
posted Hide Post
Thank you, Prarie!

Everyone has given me a lot of hints to help solve my problem. I tried to read through the Help session as well as previous discussions, still can't solve the numeric to text conversion issue.

What I need is direct conversion, no leading zero, nor decimals involved.

for example, sales order line item could be 10 or 660.

Is it possible that one of your experts show me exactly how to do it in "Detail Define" window?

Many thanks Smiler


Production WF 8.1, Test WF 8.2
Windows
HTML 5
 
Posts: 28 | Registered: October 11, 2017Report This Post
Virtuoso
posted Hide Post
It is not easy into a forum to show you how to use a GUI.
But all the following can be performed with the GUI.

For the purpose of the sample I have converted the SALES field into one that have thousand separator and decimal for then remove them.
It may not be the only way. In WF you usually have multiple way to do the same thing.
And some times you need to perform "stupid" action to get to desired result (such as field DSALES to "remove" the decimal but keep its value).
But in your case it is possible that you don't have any decimal to keep

DEFINE FILE CAR
NSALES /D10.2C = SALES / 30;
DSALES /D10c   = NSALES * 100;
TXT1   /A30V   = FPRINT(DSALES, 'D10c', 'A12') || '-' || CAR;
TXT2   /A30V   = TRIM('L', EDIT(DSALES), 10, '0', 1, 'A10') || '-' || CAR;
END
TABLE FILE CAR
PRINT NSALES
      DSALES
      TXT1
      TXT2
BY COUNTRY
END


Sometime you need to use your imagination and be creative :-)


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
Hi Martin,
You have gone above and beyond to help me with this issue, can't say enough appreciation!

I will follow your example, and play around it.

Thanks again!!


Production WF 8.1, Test WF 8.2
Windows
HTML 5
 
Posts: 28 | Registered: October 11, 2017Report 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     (CLOSED) Concatenation

Copyright © 1996-2020 Information Builders