Mandu Posted October 14, 2004 Posted October 14, 2004 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)).
Mandu Posted October 14, 2004 Author Posted October 14, 2004 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?
Ender Posted October 14, 2004 Posted October 14, 2004 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.
Mandu Posted October 14, 2004 Author Posted October 14, 2004 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
transpower Posted October 14, 2004 Posted October 14, 2004 OOPS: I see in FM Help that Relookup applies to all records in the Found Set.
Recommended Posts
This topic is 7414 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