Robert Collins Posted July 29, 2005 Posted July 29, 2005 I am looking for an elegant way to check a price of something (in a product file)while in an other table (invoices) and I thought i could do it using custom dialog. I have setup a button called check price. the dialog box asks for the product code to be entered (either via barcode which I have set to send a RETURN command after it or manaully via a keypad) I have setup two boxes - Cancel or Check (which is the delfalt one) The tricky bit I am finding is to get it to lookup the retail price based on the product code and return it via another custom dialog box. There is already a relationship between the invoice and product tables. I know i can do this by not using custom dialog boxes , but I really want to do it this way as it is not daunting for the operator. any help would be appreciated
Robert Collins Posted July 29, 2005 Author Posted July 29, 2005 sorry , I forgot to mention that the button I have setup triggers a script. which looks like this: Set Error Capture (ON) Show Custom Dialog [title: "Price Check"; Message: "Please scan the item to be price checked"; Buttons: "Check price" , "Cancel"; Input#1: Products::Item code] If [Get (Last MessageChoice )=1] ****this is the bit im stuck on***** Show Custom Dialog [Price check" ; Message: "the pice for this item is
-Queue- Posted July 29, 2005 Posted July 29, 2005 Try using a global for your input field instead, and create a relationship from it to Products::Item Code. Use this relationship in place of Products when you display the value. You may have to add a Commit Records step after the global is set. I would verify that no Item Codes in your Products table have been changed. With the way you have been doing this, unless you are in Find Mode, the related Item Code for the current record may have been changed when you entered a new one.
Robert Collins Posted July 29, 2005 Author Posted July 29, 2005 thanks for the reply. My experience with global fields is very limited as i have never had to use them. Just to clarify, do I create the global field in products table or the invoices table (the one i will be viewing when I trigger the script) Sorry to sound stupid!
-Queue- Posted July 29, 2005 Posted July 29, 2005 Actually, it does not matter. But it probably makes more sense to put it in the table associated with the layout you are currently in when you run the script.
Robert Collins Posted July 30, 2005 Author Posted July 30, 2005 I've created a global field just like to suggested and used that as the result but when I click on the 'check price' button I have created , it does nothing. could you possibly paste my script and insert what needs to be entered? thanks
-Queue- Posted August 11, 2005 Posted August 11, 2005 Use a separate relationship for the global. Then use the related fields, not lookups in the current table, to display your result. See modified attachment. examplev2.zip
Recommended Posts
This topic is 7042 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