Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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?

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.

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 ...) ...

  • Author

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.

  • Author

Oh, and thanks to both of you for the info. I will try both and see if I can get it to work.

  • Author

Yes! Your idea worked Vaughan. Your a genius, thanks a million! This has been bugging me for so long, you have no idea.

Joe

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.