January 4, 200719 yr 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.
January 4, 200719 yr Hi store the value of the global field into an $variable before going to the other table.
January 4, 200719 yr 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.
January 4, 200719 yr Author 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, 200719 yr by Guest Correct my info
January 4, 200719 yr Correction: store the value of the [color:red]regular field into an $variable before going to the other table.
January 4, 200719 yr Author 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, 200719 yr by Guest Worked it out
January 5, 200719 yr This is normal. When two tables are not related, one table cannot "see" any data in the other except for global fields.
Create an account or sign in to comment