Lashex Posted April 19, 2005 Posted April 19, 2005 I would like to perform the following task: From my main entry form while entering data into JunkTO, I want to push a button and add a new record to a history table. The current record's JunkID should be used to auto-populate the JunkID in the history table. Here's the detail... << Italic = field, Bold = Table, Underline = TO >> JunkTO is over the table JunkTable and has a number field JunkID and a text field JunkDescription JunkHistoryTO is over the table JunkHistoryTable and has a number field JunkID and a date field JunkHistoryChanged The two TO's JunkID fields have an "=" relationship between them I have tried setting up a portal field on my JunkTO main entry form exposing the JunkHistoryChanged field. However, when I edit the JunkHistoryChanged portal field the JunkID in JunkHistoryTO does not get auto-populated with the value from the JunkTO JunkID field. I also can't seem to create a new record in the new table from the entry form I am on no matter what I try. I've been trying some scripting commands... argh.. but I am completely lost. I've created an example file with the relationship in it and attached it in case my text description isn't quite clear. Any help is appreciated. JunkTest.fp7.zip
hlabonte Posted April 19, 2005 Posted April 19, 2005 This may not be the best FMP7 method as I'm still new to that, but I did something similar. You could make some global fields in your JunkTO for ID & Description. Make a script from that layout/TO ... set the globals to the fields on the current record. Then call a script for your history table layout. In that script, go to the appropriate layout, do a new record request, then set all of the fields based on the globals you just set above. Finally, clear out the globals at the end of the first script.
Lashex Posted April 22, 2005 Author Posted April 22, 2005 Thanks. I don't know if it is a best practice or not, but that worked. I'll stick with this unless anyone else has a better suggestion.
Recommended Posts
This topic is 7213 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