Home » Developer & Programmer » Forms » form formular problem
form formular problem [message #187420] Sun, 13 August 2006 19:34 Go to next message
Sharaf
Messages: 62
Registered: September 2005
Location: U.K
Member
I am using a display item to show the price of an item from the database.

i need to use a formula in my display item property.

i constructed one as below but i am still having problem.

:PRODUCT.PRICE WHERE :ORDER_DETAILS.PRODCUT_ID = PRODUCT.PRODUCT_ID

Can someone please see what i have done wrong.

thanks
Re: form formular problem [message #187450 is a reply to message #187420] Mon, 14 August 2006 01:26 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Base your block on your table. Go into 'Enter_Query' mode (using the smartbar menu button), put your search value into the 'Product_id' and then press 'Execute_Query', the answer should be brought back for you.

David
Re: form formular problem [message #187510 is a reply to message #187450] Mon, 14 August 2006 05:11 Go to previous messageGo to next message
Sharaf
Messages: 62
Registered: September 2005
Location: U.K
Member
Thanks for the reply.

i have done that before and it works but the problem is that my ORDER_DETAIL block is a tabular form which displays 5 records at a time and I have corresponding 5 product_ids which i would like to retreive prices for as soon as i had a product.
Does that means if i add 3 products or five i ll have to execute queries 5 times to bing in the prices from the product table?

What I did Alternatively is to had the product table to the form with the product_id and the price and i joined it to the ORDER_DETAIL block as a foreign key so that when i set a product_id for the ORDER_DETAIL.product_id it should bring the corresponding price in the joined product table but still it dosent work.

please help.

cheers
Re: form formular problem [message #188053 is a reply to message #187510] Wed, 16 August 2006 21:24 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Use the Post-Query trigger to get the data you want and place it in non-database items on the same block as your current record.

David
Previous Topic: Create Pattern pallete
Next Topic: Automatic Adjustment of an Image According to Screen Size and Resolution
Goto Forum:
  


Current Time: Fri Sep 20 09:40:36 CDT 2024