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

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

Recommended Posts

Posted

Is it possible to make a script that is assigned to a portal button, and upon clicking it asks you to choose an existing record from the related table, and when you choose the existing record it automatically puts the related key field ID into that record? If so, is it possible for that script to only show records with empty key fields?

Thanks for any info you might have!

Chris

Posted

You would need a script in the related file (you're using FileMaker 5, so let's call them files, not tables) that finds empty records, let's call this script "Find Empties"; for this example, you'll also need a global field in the related file, let's call it "gField ID."

In the original file, your portal button script would look like this:

Set field( related::gField ID, key field ID )

Perform script( external, Find Empties )

The find empties would simply do a search for records with empty key fields, I'll assume you know how to do that. It would also put you in Browse mode on a list layout where you have a button with this script attached:

Set field( target field ID, gField ID )

Hide Window

Get the idea?

Posted

Thanks for the feedback Fitch! I just finished making these scripts and it seems to be working perfecly. Although I'm running into trouble with my find empties script... it looks like this:

Enter Find Mode []

Go to Field [select/perform, "Employee_ID"]

Insert Text [select, "="]

Perform Find [Replace Found Set]

Perform Script [sub-scripts, "Sort by LAN IP Ascending"]

The script still brings up records with Employee IDs though. Can you tell what I'm doing wrong with this script?

Posted

Ah! I got it... It was just a matter of my find empties script not launching from the button script. Dumb problem. Thanks again Fitch!

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