April 10, 2008, 02:51 PM
RobJoins on DEFINE Fields
I'm getting the following error when trying to open the report in Dev. Studio: Error Parsing MASTER File INCIDENTS ( (FOC370) THE FIELDNAME USED IN JOIN CANNOT BE FOUND IN THE FILE: (FOC282) RESULT OF EXPRESSION IS NOT COMPATIBLE... I've seen numerous postings on this and found applicable cases within the IBI Case system. I've tried what I've seen to no avail. Below is the code.
JOIN CLEAR *
JOIN
INCIDENTS.INCIDENTS.CONTACT_NAME IN INCIDENTS TO MULTIPLE
COMBINED.COMBINED.LOGONID IN COMBINED AS J11
END
JOIN
COMBINED.COMBINED.DEPTID IN INCIDENTS TO MULTIPLE
TBL_DEPTHIER.TBL_DEPTHIER.DEPTCODE IN TBL_DEPTHIER AS J1
END
JOIN
TBL_DEPTHIER.TBL_DEPTHIER.DEPT1 IN INCIDENTS TO MULTIPLE
TBL_DEPARTMENT.TBL_DEPARTMENT.DEPTCODE IN TBL_DEPARTMENT AS J4;
END
TABLE FILE INCIDENTS
PRINT
INCIDENT_ID
Field DEPT1 is a Defined Field in TBL_DEPTHIER
I did put the code below in after the join, and tried the INDEX DEPT1 per case 22142089 with the same result:
DEFINE FILE TBL_DEPTHIER
DEPT1/A20V=DEPT1;
END
Using this as well: ON TABLE PCHOLD FORMAT HTML
Please advise. Thanks.
April 10, 2008, 04:04 PM
LeahI've never used defined fields in a master for a join, wonder 1) is it possible and 2) if so, do you need a 'with a real fieldname' in the join.
April 11, 2008, 06:42 AM
RobThanks for responding. Don't know if it's possible, and I tried the WITH in the JOIN (not sure if I put it in the right place) and incurred the same error. I'll create the DEFINE outside the .mas and post the results. Thanks.
April 11, 2008, 07:13 AM
RobLeah,
What you suggested was correct. I had it syntactically amiss. I was replacing the IN with the WITH (not adding it as another parameter). Here's the correct syntax: JOIN
TBL_DEPTHIER.TBL_DEPTHIER.DEPT1 WITH ORGCHAIN IN INCIDENTS TO MULTIPLE....
Thank you for your time and efforts.
April 11, 2008, 12:13 PM
LeahYour welcome, Rob, glad you got it to working.