GC GYM Posted January 4, 2007 Posted January 4, 2007 I'm having trouble getting the Set Field script step to work for me. I'm going to another table in the database, creating a new record which has a couple of auto enter fields, then using three set field steps; One sets the field content by a calculation - that works, Another sets the target field to = a source field from the active record in the table I came from and that works too, another sets a field to = a field (global) from the table I came from, but it just keeps leaving the target feild blank. Source and target fields are number fields. I've tried stepping through the script with debugger, that just shows that all other steps are working except this one. Any ideas? I'm obviously missing something.
Raybaudi Posted January 4, 2007 Posted January 4, 2007 Hi store the value of the global field into an $variable before going to the other table.
Fitch Posted January 4, 2007 Posted January 4, 2007 Daniele's suggestion is good, but... global fields are accessible from anywhere, even non-related tables. Are you sure the global actually has a value? I'd suggest you watch the global from the Data Viewer while stepping through the debugger.
GC GYM Posted January 4, 2007 Author Posted January 4, 2007 (edited) Thanks for the tip. I watched the data viewer as I stepped through the script steps. Here's what happened; The source field's value appeared in the data viewer while I was on the layout (and in the table) where the source field is. As soon as the script goes to the layout where the target fields are, the data viewer shows the offending source field as blank. (refreshing has no effect). The other source field from the same table and layout continues to show it's value in the data viewer. I even tried using Insert calculated result instead but to no avail. Phil Correction: Actually the global source field held it's value. It was the regular source field that wasn't going into it's target field. Edited January 4, 2007 by Guest Correct my info
Raybaudi Posted January 4, 2007 Posted January 4, 2007 Correction: store the value of the [color:red]regular field into an $variable before going to the other table.
GC GYM Posted January 4, 2007 Author Posted January 4, 2007 (edited) OK, how do I do that? It's ok I worked it out using FMHelp. Problem solved thank you. Any reason why? Is this normal or is my DB damaged? Thanks anyway people. Edited January 4, 2007 by Guest Worked it out
Fitch Posted January 5, 2007 Posted January 5, 2007 This is normal. When two tables are not related, one table cannot "see" any data in the other except for global fields.
Recommended Posts
This topic is 6534 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