Slobey Posted May 16, 2005 Posted May 16, 2005 Hi, I have a self joined relationship in a table for active employees. I created a global field called gActive and made it a calculation with "Active". I created the relationship "Self Active" and related it with my status field. The problem is when I try a GTRR command it is showing all records not just the active ones. How can this be? Did I miss something simple? I tried a button that simply says GTRR. Get related record from Self Active and clicked the Show only related records box but I still get all records. Someone help me before I pull the rest of my hair out! thanks
BobWeaver Posted May 16, 2005 Posted May 16, 2005 You need to double check that you are using the correct relationship in the GTRR. It's more complicated in FM7 than in previous versions, an I tend to get it wrong more often than not.
Slobey Posted May 16, 2005 Author Posted May 16, 2005 I have that box checked but it still doesn't work
BobWeaver Posted May 16, 2005 Posted May 16, 2005 Sorry, I missed that in your post. I edited my previous comment, but you had already replied. Double check that you are using the correct relationship. I find that FM7's way of specifying the relationship is confusing and it's easy to get it backwards.
Inky Phil Posted May 17, 2005 Posted May 17, 2005 Hey Bob, I am relieved to see that someone with 2911 posts is finding 7's approach to relationships confusing. I am an enthusiastic amateur, converting my brain to 7 and I had relationships boxed off in 5 but I spent all day yesterday trying to point things at things and missing all the time. I got there in the end but to be honest, It did not come naturally whereas in 5 it was quite straightforward. I presume it will become more obvious with practise and I can now see (just about!!) advantages to the new system. I mention this purely to encourage anyone else who may be having similiar self doubts Regards Phil
J__ Posted May 18, 2005 Posted May 18, 2005 hmm, a few thoughts: I assume you have a field called Active_State or something like that, which contains true or 'active' in each record right? and you created a gActive field - which is set to Global in the field definition dialog right? you created a self join, where the relation is gActive ---> Active_State then in a script or a calculated field you set gActive = "Active" or True depending on what you use to mean acive. If you did all that I would think it woudl work. Here's a sample, which might help - now don't expect too much, it's just a quick and dirty thrown together thing. Basically you have a layout with 2 fields (employee name & active ) and a portal, which is a join on the same table. As you add new records if the employee is active then they will appear in the grid/portal. notice the gactive field is displayed too, it's this field that you can set to 'filter' what records show up in the portal. Notice that you can click on the gActive field and a drop down appears, pick the 'InActive' from the drop down and now the grid will show all inactive records (employees) Relations are a challenge, i'm not an expert either ... they are also very powerful. hope that helps, sincerely, J__ Self_Join_Test.zip
Recommended Posts
This topic is 7199 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now