Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4196 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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

Posted
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

Posted

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

This topic is 4196 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.