spatel Posted March 10, 2005 Author Posted March 10, 2005 Hi everyone, I'm hitting a brick wall here, and would like some help if possible. I have one fp7 file with two tables. Each table has a userID field, which have an established relationship. This seems to work fine. I need a script that will do the following. When switching from a layout on table 1, will perform a find and only display records on table 2 with a matching userID. Currently, I have the following script: Enter Find Mode [] Set Field [table2::UserID; table1:UserID] Perform Find[] Go to Layout [table2] //don't remember the exact syntax I used, but I know this part works This script errors out at Perform Find. It says that an invalid search criteria has been entered and that I need to input it manually. Thanks for all your help
spatel Posted March 10, 2005 Posted March 10, 2005 Hi everyone, I'm hitting a brick wall here, and would like some help if possible. I have one fp7 file with two tables. Each table has a userID field, which have an established relationship. This seems to work fine. I need a script that will do the following. When switching from a layout on table 1, will perform a find and only display records on table 2 with a matching userID. Currently, I have the following script: Enter Find Mode [] Set Field [table2::UserID; table1:UserID] Perform Find[] Go to Layout [table2] //don't remember the exact syntax I used, but I know this part works This script errors out at Perform Find. It says that an invalid search criteria has been entered and that I need to input it manually. Thanks for all your help
spatel Posted March 10, 2005 Author Posted March 10, 2005 Hi everyone, I'm hitting a brick wall here, and would like some help if possible. I have one fp7 file with two tables. Each table has a userID field, which have an established relationship. This seems to work fine. I need a script that will do the following. When switching from a layout on table 1, will perform a find and only display records on table 2 with a matching userID. Currently, I have the following script: Enter Find Mode [] Set Field [table2::UserID; table1:UserID] Perform Find[] Go to Layout [table2] //don't remember the exact syntax I used, but I know this part works This script errors out at Perform Find. It says that an invalid search criteria has been entered and that I need to input it manually. Thanks for all your help
mr_vodka Posted March 10, 2005 Posted March 10, 2005 When you enter Find mode, no UserID is there to match on since find mode does not provide data. You can have a global field set with the UserID and then in find mode set the UserID to the global variable and your find criteria will no longer be empty.
mr_vodka Posted March 10, 2005 Posted March 10, 2005 When you enter Find mode, no UserID is there to match on since find mode does not provide data. You can have a global field set with the UserID and then in find mode set the UserID to the global variable and your find criteria will no longer be empty.
mr_vodka Posted March 10, 2005 Posted March 10, 2005 When you enter Find mode, no UserID is there to match on since find mode does not provide data. You can have a global field set with the UserID and then in find mode set the UserID to the global variable and your find criteria will no longer be empty.
spatel Posted March 11, 2005 Author Posted March 11, 2005 Okay so here is what I did: Made a global field called scratch1 in table 1. made a script to do the following: Set Field [table1::scratch1; table1::UserID] Enter Find Mode [] Set Field [table2::UserID; table1:scratch1] Perform Find[] Go to Layout [table2] Result: Doesn't error out but displays all data now in the layout for table2.
spatel Posted March 11, 2005 Author Posted March 11, 2005 Okay so here is what I did: Made a global field called scratch1 in table 1. made a script to do the following: Set Field [table1::scratch1; table1::UserID] Enter Find Mode [] Set Field [table2::UserID; table1:scratch1] Perform Find[] Go to Layout [table2] Result: Doesn't error out but displays all data now in the layout for table2.
spatel Posted March 11, 2005 Author Posted March 11, 2005 Okay so here is what I did: Made a global field called scratch1 in table 1. made a script to do the following: Set Field [table1::scratch1; table1::UserID] Enter Find Mode [] Set Field [table2::UserID; table1:scratch1] Perform Find[] Go to Layout [table2] Result: Doesn't error out but displays all data now in the layout for table2.
-Queue- Posted March 11, 2005 Posted March 11, 2005 You're performing a find in table1, not in table2, for records where table2::UserID = table1::UserID. There is no connection between the resultant found set in table1 and the found set in table2. You either need to perform your find in table2 or simply create a relationship from table1::UserID to table2::UserID and use Go to Related Records [show only related; "yourRelationship"] instead of setting a global and performing a find.
-Queue- Posted March 11, 2005 Posted March 11, 2005 You're performing a find in table1, not in table2, for records where table2::UserID = table1::UserID. There is no connection between the resultant found set in table1 and the found set in table2. You either need to perform your find in table2 or simply create a relationship from table1::UserID to table2::UserID and use Go to Related Records [show only related; "yourRelationship"] instead of setting a global and performing a find.
-Queue- Posted March 11, 2005 Posted March 11, 2005 You're performing a find in table1, not in table2, for records where table2::UserID = table1::UserID. There is no connection between the resultant found set in table1 and the found set in table2. You either need to perform your find in table2 or simply create a relationship from table1::UserID to table2::UserID and use Go to Related Records [show only related; "yourRelationship"] instead of setting a global and performing a find.
Recommended Posts
This topic is 7200 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