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
Proper Case Data?
 Login/Join
 
Member
posted
Is there a way with WF 7.1.1 to proper-case the data? i.e. I would like to automaticly convert ' PIPE,CULVERT,METALLIC' to 'Pipe,Culvert,Metallic'.


Test: XP / WF 7.1.1
 
Posts: 22 | Registered: November 21, 2005Report This Post
Guru
posted Hide Post
If you are doing a sql pass-through you can use the function INITCAP if your DB is oracle.
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Report This Post
Platinum Member
posted Hide Post
Yes Big Grin, there is a very easy way, using LCWORD function.

DM example:
-SET &STR1 = 'PIPE,CULVERT,METALLIC' ;
-SET &STR2 = LCWORD(&STR1.LENGTH, &STR1, 'A&STR1.LENGTH');
-TYPE &STR2

Regards,
Mikel

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


WebFOCUS 8.1.05, 8.2.01
 
Posts: 173 | Location: Madrid, Spain | Registered: May 09, 2003Report This Post
Expert
posted Hide Post
nb: LCWORD is quite useful, but you might have to separate your words by a comma and space in order for focus to know they are separate words;




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Member
posted Hide Post
I tried doing:
-SET &Fac = LCWORD(4096, FACILITY.FACILITY.DESCRIPTION, Fac);

in my fex, however when I try to display it using this syntax:

HEADING
"&Fac "


I get:
Facility.Facility for the output

If I change "&Fac" to "<&Fac" I get this error:
THE FIELDNAME IS NOT RECOGNIZED: Facility.Facility


Does anyone have any ideas how to make this work?

-dan

This message has been edited. Last edited by: Dan Morphis,


Test: XP / WF 7.1.1
 
Posts: 22 | Registered: November 21, 2005Report This Post
Platinum Member
posted Hide Post
In this case, try defining a new temp field:

DEFINE FILE FACILITY
  FAC/A4096 = LCWORD(4096, DESCRIPTION, FAC) ;
END

TABLE FILE FACILITY
  HEADING
    "<FAC "


Regards,
Mikel

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


WebFOCUS 8.1.05, 8.2.01
 
Posts: 173 | Location: Madrid, Spain | Registered: May 09, 2003Report This Post
Member
posted Hide Post
Mikel, thank you for your help!

I'm very new at WF, and this is what I tried in my FEX, but I get this error: (FOC406) THE FIELDNAME IS NOT RECOGNIZED: FACPROPERCASE
.

Here are the first few lines of my FEX:

DEFINE FILE FACILITY
  FACPROPERCASE/A4096 = LCWORD(4096, DESCRIPTION, FACPROPERCASE) ;
END
TABLE FILE FACILITYRESOURCE
SUM
     SEQUENCE NOPRINT
     HOURS
     DESCRIPTION
     CATEGORY
     TYPEHOURS
BY RESOURCEID
HEADING
"Resources for <FACPROPERCASE "


Can you tell me what I'm doing wrong?

Thanks,
dan


Test: XP / WF 7.1.1
 
Posts: 22 | Registered: November 21, 2005Report This Post
Platinum Member
posted Hide Post
FACILITY or FACILITYRESOURCE, what is the name of the master/table?
You must use the correct name both sides (DEFINE FILE and TABLE FILE).

DEFINE FILE FACILITY
...
TABLE FILE FACILITYRESOURCE

Regards,
Mikel


WebFOCUS 8.1.05, 8.2.01
 
Posts: 173 | Location: Madrid, Spain | Registered: May 09, 2003Report This Post
Member
posted Hide Post
quote:
FACILITY or FACILITYRESOURCE, what is the name of the master/table?



I tried to trim down the first part of the FEX to filter out what I thought was extranious info, but I think putting it in here will help explain things:

-* File FacilityResource.fex
DEFINE FILE FACILITY
FACPROPERCASE/A4096 = LCWORD(4096, DESCRIPTION, FACPROPERCASE) ;
END
JOIN
 FACILITYRESOURCE.FACILITYRESOURCE.FACILITY IN facilityresource TO MULTIPLE
 FACILITY.FACILITY.FACILITY IN facility AS J1
 END
JOIN
 FACILITYRESOURCE.FACILITYRESOURCE.RESOURCEID IN facilityresource TO MULTIPLE
 AFCS_RESOURCE.AFCS_RESOURCE.RESOURCEID IN afcs_resource AS J2
 END
TABLE FILE FACILITYRESOURCE
SUM
     SEQUENCE NOPRINT
     HOURS
     DESCRIPTION
     CATEGORY
     TYPEHOURS
BY RESOURCEID
HEADING
"Resources for <FACPROPERCASE "


In the end, Facility.Description is what I want to be proper cased in the HEADING.


Test: XP / WF 7.1.1
 
Posts: 22 | Registered: November 21, 2005Report This Post
Platinum Member
posted Hide Post
Ok, Try again:

-* 1.- First, JOINs (Important, JOIN clears previous DEFINEs)
JOIN
  FACILITYRESOURCE.FACILITYRESOURCE.FACILITY IN facilityresource TO MULTIPLE
  FACILITY.FACILITY.FACILITY IN facility AS J1
END
JOIN
  FACILITYRESOURCE.FACILITYRESOURCE.RESOURCEID IN facilityresource TO MULTIPLE
  AFCS_RESOURCE.AFCS_RESOURCE.RESOURCEID IN afcs_resource AS J2
END

-* 2.- DEFINE over host table (facilityresource) 
DEFINE FILE FACILITYRESOURCE
  FACPROPERCASE/A4096 = LCWORD(4096, DESCRIPTION, FACPROPERCASE) ;
END

-* 3.- Query.
TABLE FILE FACILITYRESOURCE
  SUM
     SEQUENCE NOPRINT
     HOURS
     DESCRIPTION
     CATEGORY
     TYPEHOURS
  BY RESOURCEID
  HEADING
    "Resources for <FACPROPERCASE "
  ...  


Regards,
Mikel


WebFOCUS 8.1.05, 8.2.01
 
Posts: 173 | Location: Madrid, Spain | Registered: May 09, 2003Report This Post
Expert
posted Hide Post
Dan, you can also do this:
-SET &Fac = LCWORD(29, 'FACILITY.FACILITY.DESCRIPTION', 'A29' );
put your argument in quotes, and
then put the output as a format 'A29' rather than the name Fac.

When using a function in dialog manager (rather than in a define), usually that final argument needs to be a format rather than a fieldname; You'll find this requirement mentioned in the doc. In a define, you can usually use either the receiving field name (as Mikel does in his examples) or the format, in quotes.

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




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Member
posted Hide Post
Mikel,
Your code worked perfectly! Now, I'm trying to do this same thing in another FEX, but I'm getting the dreaded THE FIELDNAME IS NOT RECOGNIZED: FACILITYPROPERCASE

Can you tell me what I'm doing wrong?


-* 1.- First, JOINs (Important, JOIN clears previous DEFINEs)
JOIN
  FACILITY.INSTALLATION.INSTALLATION IN facility TO MULTIPLE
  INSTALLATION.INSTALLATION.INSTALLATION IN installation AS J1
END

-* 2.- DEFINE over host table
DEFINE FILE INSTALLATION
  FACILITYPROPERCASE/A75 = LCWORD(75, DESCRIPTION, FACILITYPROPERCASE) ;
END

-* 3.- Query.
TABLE FILE FACILITY
PRINT
     INSTALLATION NOPRINT
     FACILITY

COMPUTE Type/A35 = LCWORD(35, FACILITY.INSTALLATIONFACILITY.NOUN, Type);

COMPUTE Item/A35 = LCWORD(35, FACILITY.INSTALLATIONFACILITY.DESCRIPTION, Item);
HEADING
"<FACILITYPROPERCASE"
...


Test: XP / WF 7.1.1
 
Posts: 22 | Registered: November 21, 2005Report This Post
Member
posted Hide Post
quote:
Originally posted by susannah:
Dan, you can also do this:
-SET &Fac = LCWORD(29, 'FACILITY.FACILITY.DESCRIPTION', 'A29' );
put your argument in quotes, and
then put the output as a format 'A29' rather than the name Fac.


Susannah,
I've never been able to make this work properly.

Here is what I have:
-SET &INST = LCWORD(75, INSTALLATION.INSTALLATION.DESCRIPTION, 'A75' );
-* 3.- Query.
TABLE FILE FACILITY
PRINT
     INSTALLATION NOPRINT
     FACILITY
COMPUTE Type/A35 = LCWORD(35, FACILITY.INSTALLATIONFACILITY.NOUN, Type);
COMPUTE Item/A35 = LCWORD(35, FACILITY.INSTALLATIONFACILITY.DESCRIPTION, Item);
HEADING
"&INST"


And here is what I get:
Installation.Installation.Description $€P P A75 J P Ä Àr@@ 


I'm using DevStudio (and the accompying server) for version 7.1.1 on Windows


Test: XP / WF 7.1.1
 
Posts: 22 | Registered: November 21, 2005Report This Post
Expert
posted Hide Post
Dan,

The reason that you are having a problem is for the same basic reason that many new comers have problems, and that is because you are trying to combine Dialogue Manager with actual field values. It doesn't work that way.

Because you want to convert the field DESCRIPTION within TABLE INSTALLATION using connection(?) INSTALLATION, then the field name you are showing is INSTALLATION.INSTALLATION.DESCRIPTION. If you want to use LCWORD on the field then you will have to use DEFINE OR COMPUTE.

Dialogue Manager can only be used on variable values and text strings.

To use your example -
DEFINE FILE FACILITY
LC_Desc/A75 = LCWORD(75, INSTALLATION.INSTALLATION.DESCRIPTION, 'A75' );
END
-* 3.- Query.
TABLE FILE FACILITY
PRINT
 place your fields that you want printed here - not more table names!!
HEADING
"<LC_Desc"


Don't give up, you will wonder why you had problems one day when it all clicks into place!! Smiler

T

This message has been edited. Last edited by: Tony A,



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
Platinum Member
posted Hide Post
Dan,

You must define FACILITYPROPERCASE field under the JOIN estructure host file, FACILITY table, instead of INSTALLATION table.

DEFINE FILE INSTALLATION FACILITY
FACILITYPROPERCASE/A75 = ...

TABLE FILE FACILITY


Regards,
Mikel


WebFOCUS 8.1.05, 8.2.01
 
Posts: 173 | Location: Madrid, Spain | Registered: May 09, 2003Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders