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.
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.
-* 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 "
...
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, 2003
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"
...
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.
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!!
TThis 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, 2004