ritmark Posted April 29, 2003 Posted April 29, 2003 My memberships/groups/user script is almost done. It creates the new record in the memberships database and fills out 2 of the 3 fields needed. I need help filling out the third field, because it is much more complex. In the user's database, the user selects a value from a pulldown menu. These value's are from the field Name_F in the groups database. Once the user clicks the create user button, it calls a script that opens the memberships database calls a script in that database that creates a new record, and does the rest of this. One field is filled in with auto-fill, and one is filled in using copy/paste. The third field I need to fill in is a value from the groups database. I need to take that value they selected from the Users database pulldown menu(Name_F), and perform a search in the Groups database, using that value as a paramater in the Name_F field, and find the matching Group_Number value. Then I need to take that value and put it into the third field in the memberships database. I would like to have all this happen from the script that runs in the memberhships database, the one that creates a new record, and filles in the other 2 fields. Can this be done? --Mark
Ugo DI LUCA Posted April 29, 2003 Posted April 29, 2003 Hi Mark, Did you really forgot FM was relational ? the matching Group_Number value will be looked up to the the third field in the memberships database using relationship Name_F::Name_F. I still don't understand what you're doing though with all these scripts...
cjaeger Posted April 29, 2003 Posted April 29, 2003 The problem he has was already solved in Version 2.0 (or was it 1.0?) by using lookups from another file. I can understand that beginners sometimes prefer scripts over relations, because they just have to duplicate the exact steps they woud do manually with scripts. But then, is a relation that much different? you instruct to computer to perform a search in a(nother) file and return the records matching the find criteria in a list. the search criteria - that's your key in the main file. And the related records just the found set. two differences: relations perform this find dynamically, and they can only do an exact find. But if you bas the relation on a global field in the main file, they are (almost) as flexible as manual finds .... Hello, ritmark, if you think of relations this way you will probably find the solution yourself. And yes, it is possible to recreate just about any relation with scripts ... It's just not worth the effort.
ritmark Posted April 29, 2003 Author Posted April 29, 2003 Just want to end this thread now. I am taking a much much better aproach to this problem.
Recommended Posts
This topic is 7883 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