sparkiwi Posted May 27, 2008 Share Posted May 27, 2008 New to filemaker and somehow I am missing something obvious I have a layout based on Parent Table called Clients This has a portal with related records from Table called Contact Names lets call this portal 1 I have a self join relationship from Contacts---Contacts 2 At the Top of the layout is details from Parent Client file Halfway down on the left is a portal with contact names from a calculated concantation of first and last names that is in the table this is showing 12 records at a time with scroll bars Next to this on the right I have portal 2 showing Contacts 2 and 1 line only with the field ''notes'' from contact 2 My question is how can I have portal 2 synchronise with the related record when I click a row in portal 1 assuming I turn the field into buttons? Link to comment Share on other sites More sharing options...
David Head Posted May 27, 2008 Share Posted May 27, 2008 I have a layout based on Parent Table called ClientsThis has a portal with related records from Table called Contact Names lets call this portal 1 I have a self join relationship from Contacts---Contacts 2 At the Top of the layout is details from Parent Client file Halfway down on the left is a portal with contact names from a calculated concantation of first and last names that is in the table this is showing 12 records at a time with scroll bars Next to this on the right I have portal 2 showing Contacts 2 and 1 line only with the field ''notes'' from contact 2 My question is how can I have portal 2 synchronise with the related record when I click a row in portal 1 assuming I turn the field into buttons? OK, I've read that a few times and don't know what you are trying to do. What is the self join for? What fields are used? Is this whole description talking about the same layout? Might be better top explain what you would like to set up and we might be able to suggest the best way. Link to comment Share on other sites More sharing options...
sparkiwi Posted May 27, 2008 Author Share Posted May 27, 2008 Hope this helps It's all about clicking on a record in portal 1 (contacts) and showing only related record in portal 2 (contacts) Link to comment Share on other sites More sharing options...
sparkiwi Posted May 27, 2008 Author Share Posted May 27, 2008 1 Client may have many Contacts - using portal1 to show all related contacts when i click a row(record) in portal 1 I want to be able to view/update/add the contact details in a subform that only relates to the contact that I clicked. Currently I can only get this to show the first related record not the one I clicked in portal 1. Yes I realise I can do this in a new window/layout but would like to be able to do this on the same layout. Sorry I am not describing this very well but I know how to do this in MS Access using VBA - just evaluating using FM instead for a new solution/new client/new challenge. Link to comment Share on other sites More sharing options...
aaa Posted May 27, 2008 Share Posted May 27, 2008 Hi, sparkivi. Look attachment. Create self relation based on fullname with "x", such that you will see all records in portal 1. Then for field in portal 1 set button Go to related record. Link to comment Share on other sites More sharing options...
sparkiwi Posted May 27, 2008 Author Share Posted May 27, 2008 BTW here is my experimental 1st effort at a FM file for my evaluation purposes that show where i am at (stumped) http://www.obs.co.nz/Client Activity.fp7 Link to comment Share on other sites More sharing options...
sparkiwi Posted May 27, 2008 Author Share Posted May 27, 2008 Thanks aaa I guess I will have to subscribe to download the file example. (am I really committed to FM?) I think it looks really pretty and has lots of features that Access doesn't but I am a programmer and the paint-by-numbers scripting is not a great appeal (try setting object.visible=false to any controls or fields). However I think that FM server IWP will be really useful for my clients so I guess I may use it in the future so what-the-hell - here goes.... Link to comment Share on other sites More sharing options...
sparkiwi Posted May 27, 2008 Author Share Posted May 27, 2008 Hi, sparkivi.Look attachment. Create self relation based on fullname with "x", such that you will see all records in portal 1. Then for field in portal 1 set button Go to related record. Thanks aaa this works in a Parent-Parent situation but for me does not work in a 2 portal child layout - I get the error "This operation could not be completed because this layout cannot display the result"" Link to comment Share on other sites More sharing options...
aaa Posted May 27, 2008 Share Posted May 27, 2008 I downloded your file and want to understand where in this layout you want to to see details of contact. Link to comment Share on other sites More sharing options...
sparkiwi Posted May 27, 2008 Author Share Posted May 27, 2008 If i click in the portal record for Sporle-Fahey I want it to show the notes for Sheryl-Sporle-Fahey on the right - not the notes for John Ward Link to comment Share on other sites More sharing options...
aaa Posted May 27, 2008 Share Posted May 27, 2008 May be such? I little changed your fle. Look at detail button in Contacts portal Link to comment Share on other sites More sharing options...
aaa Posted May 27, 2008 Share Posted May 27, 2008 I does not read your last post. Now it changes notes too. Link to comment Share on other sites More sharing options...
sparkiwi Posted May 27, 2008 Author Share Posted May 27, 2008 WOW - thanks a lot aaa that works well - it's time for bed now but if It can be a little less ugly - it will be a great contribution to the FM techniques Link to comment Share on other sites More sharing options...
Techphan Posted May 27, 2008 Share Posted May 27, 2008 Sorry-Should have read entire thread. Nice work by 'aaa.' Link to comment Share on other sites More sharing options...
sparkiwi Posted May 27, 2008 Author Share Posted May 27, 2008 Ok thanks to aaa's method I have tidied this up somewhat Here is the file for anyone playing along http://www.obs.co.nz/Client Activity V4.fp7 Now I have a few more issues - which you can see in the file Can I also trigger the set field script when I enter any of the rows in the left hand portal? Can I set the Global to 0 when navigating to a different Client record? because my first Contacts record is blank with a foreign key of 0 and this would be better than showing the unrelated data - what would be the trigger for this? Sorry to be such a FM newbie but I am really missing the Access "on event" capabilities Link to comment Share on other sites More sharing options...
David Head Posted May 28, 2008 Share Posted May 28, 2008 Can I also trigger the set field script when I enter any of the rows in the left hand portal?Not natively. You need to use a plugin such as ZippScript.Can I set the Global to 0 when navigating to a different Client record? because my first Contacts record is blank with a foreign key of 0 and this would be better than showing the unrelated data - what would be the trigger for this?No problem. You are using buttons for record navigation. If you utilise a script for these buttons, you can also get it to clear the global. There is no need to have the value set to 0 and have a dummy record - just clear the field by setting it to "". See the attached modified file. Look at the script and see how it has been applied to the navigation buttons. Sorry to be such a FM newbie but I am really missing the Access "on event" capabilitiesYes, we have been waiting for event triggers for some years now. FileMaker Inc., has previously suggested that they are close to delivering - maybe next version. Link to comment Share on other sites More sharing options...
sparkiwi Posted May 28, 2008 Author Share Posted May 28, 2008 Thanks for that David - I especially appreciate the Goto Record Script Link to comment Share on other sites More sharing options...
Recommended Posts