October 14, 200421 yr The Customers DB record contains a Telephone number and name/address information. The Invoices DB record contains a Telephone number, as well as name/address fields that are defined as Lookup from Customers based on Telephone. When I add a new customer, I start by typing his tele. no. and name/address in the Invoices record, and clicking a button to drive AddCustomer script. That, in turn, drives an external script in Customers which creates a new record and populates it by reading the relevant fields from the current record in Invoices. So far, so good. The external script then pauses to display the newly-added Customers record, allowing it to be doublechecked and edited if need be. When done, you click Continue, allowing Invoice's AddCustomer script to continue. At this point, I want the Invoice name and address fields to re-look themselves up, just in case the user made any changes during the doublecheck. To do this, I copy and paste the Telephone number into itself. Now I believe I have to move the cursor somewhere else to trigger the lookup. I can do that with Goto Next Field, but I'd like to have it move back to the field the user had it in before he ran AddCustomer. So two questions: -- is this a clean way to trigger a relookup? -- how does one get the cursor back into some field? Goto Field doesn't seem to have a form allowing a variable value (such as that returned by Status(CurrentField)).
October 14, 200421 yr Author I had done that, and very nearly ruined a production database this morning. I need to relookup for the *current* record only. Or am I missing an option in the "Relookup Contents" script step?
October 14, 200421 yr Try: Set Field [ "Phone#" ; "Phone#" ] This replaces the Phone# with the existing value for the current record only. In version 7, focus is left in the previous field, but I haven't tested it with FM6.
October 14, 200421 yr Author Thanks -- it does seem to lose focus in V6, but it's not the end of the world and your approach is dead simple. Chap
Create an account or sign in to comment