What type of field is "company code"? If it is an unstored calculation field or a field with global storage, this won't work.
"Accounts:company code" is a global field you need to be sure to add 1 record to that table or the portal will not display anything.
It works fine with global fields as long as you remember the need for having a record.
Didnt register as a self join in my brain.
company code is a text field, indexed.
Then everything looks correct. Since it doesn't work, we're still asking questions.
Exactly what steps did you use to create Accounts2?
If you hover the mouse over the arrow in the upper left corner of these two boxes in Manage | database | Relationships, do you see the exact same data source table names pop up?
They are the same data sources.
How I added the relationship was: went to the Manage Database > Relationships and from the lower left corder, I clicked on the add tables/Relationships button and added the table relationship. I've created so many relationships before that I just don't understand why it is not working....
You may just have to try starting over. Delete the portal delete the relationship and even the Table occurance and re apply them.
When I create a table occurrence for a self join relationship like this, I select the exising occurrence and click the button with two green plus signs. That saves a few steps and I am sure to have exactly the same data source table for both occurrences.
Wonder if you need to re-index the company code field?
To rebuild the index of a single field:
- Open Manage | Database | Fields and double click the field
- Use either the storage tab or the storage options button to turn off indexing.
- Exit Manage | Database, then return and turn indexing back on.
You can also rebuild all your file's indexes by importing all the data into an empty copy (clone) of your file.
If you have FileMaker 11, you can use Advanced Recovery options to rebuild your file's indexes:
- With the file closed, select Recover from the File Menu.
- Select "Use advanced Options"
- Select only: "Copy File Blocks as-is" and "Rebuild Field Indexes Now".
I just re-opened the fine and I tried to test with other record.... it looks like it's sorting becuase it is taking a while...
It is all working fine now. It looked like there was a hung up somewhere..
What I did was:
1. Delete the table occurance, relationship and the portal.
2. Rename the new table occurance as: Accounts Related
3. Add new relationship and the portal.
Now it all seems to be working..... Very weird but I guess it is what it is...