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.
Posted October 05, 2007 03:29 PM Is there a way to join two fields in one table together.
Currently I have JOIN ATTRIBUTEVALUE IN SUBJECTS TO CF_SUBJECTCLIENTSERVICES IN MSCRM_PHONECALL AS J1
If the join goes to two lines you have to have an END for each on a line by itself works best. Also you have to label each join with an unique identifier, that is J1 for the first J2 for the second.
Leah
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004
JOIN ATTRIBUTEVALUE IN SUBJECTS TO CF_SUBJECTCLIENTSERVICES AND CF_SUBJECTSALES IN MSCRM_PHONECALL AS J1
Yuo can try this, although, I never had a need to, nor, if WebFOCUS will allow:
JOIN ATTRIBUTEVALUE AND ATTRIBUTEVALUE IN SUBJECTS TO CF_SUBJECTCLIENTSERVICES AND CF_SUBJECTSALES IN MSCRM_PHONECALL AS J1
I would:
JOIN ATTRIBUTEVALUE IN SUBJECTS TO CF_SUBJECTCLIENTSERVICES IN MSCRM_PHONECALL AS J1 JOIN ATTRIBUTEVALUE IN SUBJECTS TO CF_SUBJECTSALES IN MSCRM_PHONECALL AS J2 -RUN
You can add the ALL parameter to both of Tom's joins. You would then have a multipath and the issues concommitant with that.
GG, can you comment as to whether there are multiple rows containing the same ATTRIBUTEVALUE in the phone table?This message has been edited. Last edited by: GinnyJakes,
Joining to two fields with a FOCUS data base is not supported. Using relational data sources this technique may be supported (depends on the type of rdbms). But there is a fairly easy way to get this to work: Do a single field join. So in your case it would be
JOIN ATTRIBUTEVALUE IN SUBJECTS TO CF_SUBJECTCLIENTSERVICES IN MSCRM_PHONECALL AS J1
Then code your request and in the request also include this where:
WHERE SECONDVALUE EQ CF_SUBJECTSALES ;
Is this idea helpful?
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
Are you wanting ATTRIBUTEVALUE equal to CF_SUBJECTCLIENTSERVICES || CF_SUBJECTSALES? If you can turn this around making MSCRM_PHONECALL the host, you can use a define based join.
Pat WF 7.6.8, AIX, AS400, NT AS400 FOCUS, AIX FOCUS, Oracle, DB2, JDE, Lotus Notes
Posts: 755 | Location: TX | Registered: September 25, 2007
Previous post may be onto to something. GGOP, can you post the parts of the two masters that contain the suffix and the join to and from fields? That would make it easier for us to help you.
Also, GamP, multi-field join for fixed format sequential files is available in 7.6. That won't help GGOP as he is on 5.3.
Here's my code. I'm just not getting the correct data. If I get CF_SUBJECTCLIENTSERVICES and CF_SUBJECTSALES join properly then it will return the correct data possibly.
TABLE FILE MSCRM_STRINGMAP PRINT ATTRIBUTENAME ATTRIBUTEVALUE VALUE COMPUTE SUBJECT/A255 = IF VALUE EQ '-Pick a Subject-' THEN 'MISSINGSUBJECT' ELSE IF VALUE EQ 'ACB' THEN 'ACB' ELSE IF VALUE EQ 'Account Inquiry' THEN 'ACCOUNTINQUIRY' ELSE IF VALUE EQ 'Dealer Rep kit Request' THEN 'DEALERREPKITREQUEST' ELSE IF VALUE EQ 'DIP (Outgoing)' THEN 'DIPOUTGOING' ELSE IF VALUE EQ 'DSC Full Report' THEN 'DSCFULLREPORT' ELSE IF VALUE EQ 'DSC Inquiry' THEN 'DSCINQUIRY' ELSE IF VALUE EQ 'DSC Refund' THEN 'DSCREFUND' ELSE IF VALUE EQ 'Full Free Unit Report' THEN 'FULLFREEUNITREPORT' ELSE IF VALUE EQ 'Full Trial Balance Report' THEN 'FULLTRIALBALANCEREPORT' ELSE IF VALUE EQ 'Income Trusts' THEN 'INCOMETRUSTS' ELSE IF VALUE EQ 'Marketing Fulfillment' THEN 'MARKETINGFULFILLMENT' ELSE IF VALUE EQ 'Other' THEN 'OTHER' ELSE IF VALUE CONTAINS 'PPN' THEN 'PPNSLINKNOTES' ELSE IF VALUE EQ 'Product Inquiry' THEN 'PRODUCTINQUIRY' ELSE IF VALUE EQ 'Statement Request' THEN 'STATEMENTREQUEST' ELSE IF VALUE EQ 'Tax Inquiry' THEN 'TAXINQUIRY' ELSE IF VALUE EQ 'Flow Through' THEN 'FLOWTHROUGH' ELSE IF VALUE EQ 'Market Conditions' THEN 'MARKETCONDITIONS' ELSE IF VALUE EQ 'Book Meeting' THEN 'BOOKMEETING' ELSE IF VALUE EQ 'Follow-up' THEN 'FOLLOWUP' ELSE IF VALUE EQ 'Fund Campaign' THEN 'FUNDCAMPAIGN' ELSE IF VALUE EQ 'Introduction' THEN 'INTRODUCTION' ELSE IF VALUE EQ 'Information Change' THEN 'INFORMATIONCHANGE' ELSE IF VALUE EQ 'Marketing' THEN 'MARKETING' ELSE IF VALUE EQ 'Problem Resolution' THEN 'PROBLEMRESOLUTION' ELSE IF VALUE EQ 'RSM Project' THEN 'RSMPROJECT' ELSE IF VALUE EQ 'Rep Complaint' THEN 'REPCOMPLAINT' ELSE IF VALUE EQ 'Rep Request/Change Meeting' THEN 'REPREQUESTCHANGEMEETING' ELSE IF VALUE EQ 'Rep Inquiry' THEN 'REPINQUIRY' ELSE IF VALUE EQ 'Thank You' THEN 'THANKYOU' ELSE IF VALUE EQ 'Rep Request Promos' THEN 'REPREQUESTPROMOS' ELSE IF VALUE EQ 'Income Trusts' THEN 'INCOMETRUSTS' ELSE IF VALUE EQ 'Prospectus' THEN 'PROSPECTUS' ELSE IF VALUE EQ 'Due Diligence' THEN 'DUEDILIGENCE' ELSE VALUE; WHERE OBJECTTYPECODE = 4210 AND (ATTRIBUTENAME EQ 'cf_subjectclientservices') OR (ATTRIBUTENAME EQ 'cf_subjectsales') BY ATTRIBUTEVALUE NOPRINT ON TABLE HOLD AS SUBJECTS END -RUN
JOIN VALUE IN SUBJECTS TO ALL SUBJECT IN MSCRM_PHONECALL AS J1 -*JOIN CF_SUBJECTCLIENTSERVICES IN MSCRM_PHONECALL TO ALL ATTRIBUTEVALUE IN SUBJECTS AS J1 -*JOIN CF_SUBJECTSALES IN MSCRM_PHONECALL TO ALL ATTRIBUTEVALUE IN SUBJECTS AS J2 -*JOIN ATTRIBUTEVALUE AND ATTRIBUTEVALUE IN SUBJECTS TO ALL CF_SUBJECTCLIENTSERVICES AND CF_SUBJECTSALES IN MSCRM_PHONECALL AS J1
TABLE FILE SUBJECTS SUM CNT.SUBJECT AS 'Subjects' MAX.CREATEDBYNAME OWNERID CREATEDBY REGARDINGOBJECTID REGARDINGOBJECTTYPECODE &WHEREDATE1 BY CREATEDBY BY SUBJECT ON TABLE HOLD AS COUNTSUB END -RUN
It has been a long time since I have done this and you might want to refer to the Creating Reports with WebFocus Manual (Chapter 14). The second question is can you make MSCRM_PHONECALL your host file?
If you can, your join will work like this: JOIN SERVICE_SALES WITH CF_SUBJECTCLIENTSERVICES IN MSCRM_PHONECALL TAG P TO ALL ATTRIBUTEVALUE IN SUBJECTS TAG S AS J1 END -RUN DEFINE FILE MSCRM_PHONECALL SERVICE_SALES/AXXX= P.CF_SUBJECTCLIENTSERVICES || P.CF_SUBJECTSALES; END TABLE FILE MSCRM_PHONECALL etc.
Your TAGs then define which file the data is coming from. If you are joining to other files the tags remain the same. If you can't change the hostfile, try to substring ATTRIBUTEVALUE into 2 fields. They have to be the first fields in your define. I'm not sure this will work.
JOIN SERVICE WITH ATTRIBUTEVALUE AND SALES WITH ATTRIBUTEVALUE IN SUBJECTS TAG S TO CF_SUBJECTCLIENTSERVICES AND CF_SUBJECTSALES IN MSCRM_PHONECALL TAG P END -RUN DEFINE FILE SUBJECTS SERVICE/AXXX=SUBSTR(inlength, ATTRIBUTEVALUE, start, end, sublength, outfield); SALES/AXXX=SUBSTR(inlength, ATTRIBUTEVALUE, start, end, sublength, outfield); END TABLE FILE SUBJECTS
etc
GOOD LUCK!
Pat WF 7.6.8, AIX, AS400, NT AS400 FOCUS, AIX FOCUS, Oracle, DB2, JDE, Lotus Notes
Posts: 755 | Location: TX | Registered: September 25, 2007
Or you can create a held FOCUS file from the phone file with a concatenated index and join to it.
Cribbing some of PBrightwell's code:
DEFINE FILE MSCRM_PHONECALL SERV_SALES/AXXX= P.CF_SUBJECTCLIENTSERVICES || P.CF_SUBJECTSALES; END TABLE FILE MSCRM_PHONECALL PRINT ... BY SERVICE_SALES ON TABLE HOLD AS TELEHOLD FORMAT FOCUS INDEX SERV_SALES END
JOIN ATTRIBUTEVALUE IN SUBJECTS TO SERV_SALES IN TELEHOLD AS J1
This is a tried and true method and I hope it works for you.
Example: JOIN FILE TITLES AT TITLE_ID TAG TTL TO ALL FILE ROYSCHED AT TITLE_ID TAG ROY AS J0 WHERE TTL.TITLE_ID1 EQ ROY.TITLE1_ID; WHERE TTL.TITLE_ID2 EQ ROY.TITLE2_ID; END
Prod: WF 7.6.10 windows. -- MRE/Dashboard/Self Service/ReportCaster - Windows XP
Posts: 82 | Location: Chicago | Registered: September 28, 2005
Your MRE Enterprise Domain has several programs that access the MSCRM_STRINGMAP table.
Meanwhile, if you break this problem down to smaller pieces I may begin to understand what you want to do.
You first posting questions if we can join to two columns in the same table. We may be able to, depending on the business problem you're trying to resolve:
JOIN ATTRIBUTEVALUE IN SUBJECTS TO CF_SUBJECTCLIENTSERVICES IN MSCRM_PHONECALL TAG J1 AS J1
JOIN ATTRIBUTEVALUE IN SUBJECTS TO CF_SUBJECTSALES IN MSCRM_PHONECALL TAG J2 AS J2
The TAG attribute prefixes all the columns in the cross-referenced file, e.g. columns in table MSCRM_PHONECALL in the first join are prefixed with J1.column-name. This is how you would be able to join twice and access the columns with different names.
I don't know if this will help you resolve what you want to do, but I would enable SQL traces and make sure that the appropriate WHERE statements appear for each JOIN, if necessary.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
We are using Microsoft CRM too and created several reports on the database. The database is rather complex and we let the developers create several views to perform the wanted selections. The end result was very slow so we decided to create some more efficient FOCUS tables with several index fields. That database is loaded/created every night.
The main problem IMHO is that many tables use the same fieldnames which make the building process very confusing.
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006