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

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

Recommended Posts

Posted

This is a problem that I run into with almost every data base I create. In my latest database I actually have 2 related databases. The first is "Clients" and is a basic contact manager. The second is "Policies" which holds all the policy information for all my clients (in case you haven't figured it out this is for an insurance agency). In my Client DB I have a button that creates a new policy. The script is supposed to copy the client id, open the policies DB, request a new record, past the client id and based on the id the pertinent demographic data from Client DB is shown in related fields (like last name, first name, etc.). Then back in my Client DB I have a portal that shows each policy a client has in a repeating field.

Here is where the problem starts. If I am looking at the layout in my Client DB that shows the policies portal, the policies DB must be open. If I then hit the Create new policy button, instead of opening policies (cause it is already open), copying the client id, etc. the Policies DB just pops up with the record/policy I last created. I then have to manually create a new record and enter the client id. This defeats the whole purpose of my "Create Policy" button and script. Is there a better way to achieve this? Would a look up work better?

Posted

Why not just check the "allow creation of related records" in the relationship so that creating new related records is a simple as typing into the blank row at the bottom of the portal?

To fix your script (if you still want to do it this way) don't use the Open [] step. Use the Perform Script [] step and call the "Make new related record" script in the related database as an external script. It never fails.

Posted

I'd add a file: you've Clients and Policies; add a ClientPolice file (a so-called join file) in which you'll create a record for any combination of Client and Policy you may have, while the Policies file holds one record per Policy

Relate Clients to ClientPolice by ClientID and relate Policies to ClientPolice by PolicyID; in ClientPolice make similar ("reverse") relationships towards Clients and Policies by whcih you can look up client and policy data

Create new policies for a client either using the option "allow creation of related records" or with a script like yours (copy clientID, go to ClientPolice, create new record, paste clientID ...) ...

Posted

In reply to:

Why not just check the "allow creation of related records" in the relationship so that creating new related records is a simple as typing into the blank row at the bottom of the portal?


One reason I didn't do it this way was because I'm a newbie and didn't know that I could! The main reason is because each Policy record will contain a lot more info than what would be shown in the portal.

This topic is 8220 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.