life036 Posted April 2, 2005 Posted April 2, 2005 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
Fitch Posted April 3, 2005 Posted April 3, 2005 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?
life036 Posted April 5, 2005 Author Posted April 5, 2005 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?
life036 Posted April 5, 2005 Author Posted April 5, 2005 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!
Recommended Posts
This topic is 7519 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 accountSign in
Already have an account? Sign in here.
Sign In Now