Focal Point
[SOLVED] uppercase letter.

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4577010786

June 19, 2017, 01:06 PM
Developer
[SOLVED] uppercase letter.
Hi All,

in One Filed i need upper case(FIRST/LAST/) and remaining as first letter as uppercase

I have a Column from DB below example_1 and i need output like as Example_2

Input Message example_1
-SET &MYNAME = 'first/last/description/this is text message's/this message has been edited.';


output Message example_2
FIRST/LAST/Description/This Is Text Message's/This Message Has Been Edited.

every values is different based on second forward slash symbol "/" how to extract part of this
Like first/last/
how to extract still second forward slash symbol "/"

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


WebFOCUS 8202
June 19, 2017, 01:20 PM
MartinY
Look for functions :

- CTRAN
- EDIT
- LCWORD
- STRAN
- STRREP
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
June 19, 2017, 01:32 PM
susannah
you want the PROPER( ) function




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
June 19, 2017, 01:51 PM
Developer
values are from column every column is not same value but based on forward slash symbol "/" how to extract still second forward slash symbol
quote:
Originally posted by MartinY:
Look for functions :

- CTRAN
- EDIT
- LCWORD
- STRAN
- STRREP
IB Functions



WebFOCUS 8202
June 19, 2017, 02:46 PM
MartinY
My personal thinking : you need to search and look at available functions. Then, play with them.
Since I don't think that it will have a single and simple solution due to your various data, you need to do your research except if the PROPER() function (which I can't find in doc) do the trick for you.


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
June 19, 2017, 05:59 PM
Waz
The best way, is probably to use a DEFINE function, and pull each / token, fix it, and rebuild the string and return it.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

June 20, 2017, 09:08 AM
Danny-SRL
How many forward slashes in your data?
4?
variable?


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

June 20, 2017, 10:31 AM
susannah
oh yeah, that's excel. mea culpa
In wf , its LCWORD
MIXED_CASE/A15 = LCWORD(15, LAST_NAME, MIXED_CASE);

you could use STRIP function to remove the /




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
June 20, 2017, 10:49 AM
Developer
quote:
Originally posted by Danny-SRL:
How many forward slashes in your data?
4?
variable?


Values are coming form database ,forward slashes are not constant its dyanimic values,
but from still 2nd slash i can keep in one variable.
but from 2 slashes still end how to take in one variable

Please help me


WebFOCUS 8202
June 20, 2017, 12:42 PM
susannah
use the POSIT function to get the position of the 1st slash
use the POSIT function again, starting with the position of the 1st slash+1, to find the position of the 2nd slash. if the POSIT function returns 0, then there are no more slashes.
then use the SUBSTR function to capture the string beginning with the value of the 2nd slash + 1




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
June 20, 2017, 01:22 PM
Danny-SRL
You say "variable". Does that mean that these strings are help in an &variable?
Or are they in a field, used in a report?


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

June 20, 2017, 01:50 PM
MartinY
I think that what Developer mean is that the forward slash may appear anywhere in the string (column field data) in a undetermined number of time.

So what he need from us is to built a function that will loop the whole string and format it.

LCWORD partially do the trick but as his first sample :
first/last/description/this is text message's/this message has been edited

Once LCWORD is applied become :
First/Last/Description/This Is Text Message'S/This Message Has Been Edited

The issue is with Message'S where the "s" is put in capital because of the quote that is "detected" as the beginning of a new word which is not the case.

So not only have to deal with the slash's, but with special characters... No easy way to solve this I think.
I think that with all the function that we give (and others that are in the manuals), it's now possible to figure a combination that may suit the need.


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
June 21, 2017, 03:53 AM
Developer
i can use LCWORD2 function this type of "Message'S"

quote:
Originally posted by MartinY:
I think that what Developer mean is that the forward slash may appear anywhere in the string (column field data) in a undetermined number of time.

So what he need from us is to built a function that will loop the whole string and format it.

LCWORD partially do the trick but as his first sample :
first/last/description/this is text message's/this message has been edited

Once LCWORD is applied become :
First/Last/Description/This Is Text Message'S/This Message Has Been Edited

The issue is with Message'S where the "s" is put in capital because of the quote that is "detected" as the beginning of a new word which is not the case.

So not only have to deal with the slash's, but with special characters... No easy way to solve this I think.
I think that with all the function that we give (and others that are in the manuals), it's now possible to figure a combination that may suit the need.



WebFOCUS 8202