Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7042 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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

Posted

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.

Posted

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!

Posted

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.

Posted

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

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.