Is it possible to lookup and display a field from another file on an entry window in arev 3.1. I need to display the price of a part in our order entry screen. The price is stored in a separate file and must be displayed after entering the part and cust (key fields), not when selecting the price field (which must be display only). I have written the code to do this lookup in a posting program but dont know how to get it to work with a window. Im new to arev and would appreciate any help your willing to share.
Thanks, Mike. ([email protected])
Mike,
The easiest way to do this is to define a symbolic dictionary field (which is a miniature program) in the table to which the window is bound. This symbolic woould take the relevant pieces of information and perform the lookup to the other table and return the price.
Then, on your window, bind the price prompt to the symbolic field. As soon as all of the relevant information is entered on the window, the price will automatically display.
This will also solve your display only requirement, because symbolic fields cannot be edited.
One note, if you write the record to a historical tracking table, you will probably want to do a hard write of the price for accuracy 6 months from now. The symbolic will always reflect the most current information in the lookup table.
Matt Sorrell
Best way to create the field is go into the dictionary window, create a new field name, make it an S type then go to the formula field.
If you hit F2 twice, it will bring up a formula builder "wizard" type thing which will prompt you for information on creating some simple symbolics. What you want is to join a field from another table.