May 20, 201312 yr I have a Contacts Table and an Addresses Table within FM12 Advanced. Each Contact can have multiple addresses flagged as Home, Work, Billing, Etc... I need the following behavior to be implemented: 1. Only One Address can be the primary address with all the other ones automatically flagged as Secondary. 2. When the first Address is created, it is automatically flagged as a primary address. 3. If there are multiple addresses, only one can be Primary. 4. When an address is changed to primary, all the other addresses related to the particular contact must be changed to secondary. 5. When viewing the related addresses within a Portal in the contact Database, They must be sorted so that the primary address is always on top. A good example of this can be seen by clicking on the "Core4Web Demo" link at http://www.core4crm.com/. What kind of table structures, field setup, calculations, script triggers (unless there is a more elegant way) do I need to create to make this possible. I am a FileMaker intermediate user and familiar with relationship structures but am not an expert. Any help would be much appreciated. Ganesh
May 20, 201312 yr Hi Ganesh, I have uploaded a FM solution file for the same functionality as you described over here. Please go through that and let me know your response. Download the file from link below. http://fmforums.com/forum/files/file/41-contact-address/ Think this solution will help you out. with regards,
May 20, 201312 yr Solution Majit, there are several problems with your solution. Here is a revised version. All you really need to do is store the foreign key for the primary address ID in Contacts. ContactAddress2.fmp12.zip
May 27, 201312 yr Author Dear Manjit and bcooney, Thanks a lot for offering to help with this issue. I tried both your solutions and for some reason I have some hiccups. With Manjit's solution, I was able to get a lot of it to work but I cannot figure out how to make sure that the first portal row created is always flagged as primary AND I could not get the Primary portal row to automatically go to the top. In Manjit's example file the portal row flagged as primary goes to the top but I am still able to flag more than one record as primary. I only want one portal row to be the primary and everything else is relegated to secondary once a portal row is flagged as primary. I am attaching the file that I created to mimic what Manjit did and for the life of me I could not get it to work. I have uploaded my file "Ganesh Portal Line Sort Test1.fmp12"to my dropbox public folder at https://dl.dropboxusercontent.com/u/1980332/Ganesh%20Portal%20Line%20Sort%20Test1.fmp12. With bconney's solution, which is much simpler, I could not get the portal to work properly. I could not get the Portal to flag a portal row record as primary and I could not get it to automatically sort. work. I have uploaded my file "Ganesh Portal Line Sort Test2.fmp12"to my dropbox public folder at https://dl.dropboxusercontent.com/u/1980332/Ganesh%20Portal%20Line%20Sort%20Test2.fmp12. I am stumped and I would appreciate any help! Thanks again for taking the time. Thanks, Ganesh
May 27, 201312 yr Hey Ganesh, Please attach your files to a reply. If you unsure on how to do this, click this link. How to add an attachment to a reply Let us know if you need help.
May 29, 201312 yr Author Dear Lee, Thanks again. I was stumped as to how to upload a file and now I know. I figured out what the problem was. I had to make some small adjustments in Manjit's file and I got his solution to work for me. I opened his file in FM12 Advanced and made some changes in the Scripts and it works now. I think something was lost in translation when I converted. Thanks Manjit for the great solution. Awesome! Ganesh
Create an account or sign in to comment