Calculation Mode Formula item... Cant Save WHY????? [message #159133] |
Thu, 16 February 2006 06:00 |
kamran.it
Messages: 265 Registered: September 2005 Location: Karachi
|
Senior Member |
|
|
Dear All
I have three feilds a,b,c
I define a formula in calculation mode
****(define in C field)***
Calulation mode = fomula
formula= a+b*100
summary function = none
formaula working properly but field "C" dont save in table.
Kamran
|
|
|
|
|
|
|
|
|
Re: Calculation Mode Formula item... Cant Save WHY????? [message #160395 is a reply to message #159404] |
Sat, 25 February 2006 00:43 |
kamran.it
Messages: 265 Registered: September 2005 Location: Karachi
|
Senior Member |
|
|
hi all
Please help me I am facing a problem in form
****** three feilds a,b,c
****(define in C field)***
I define a formula in calculation mode
Calulation mode = formula
formula= a+b*100
summary function = none
formaula is working properly but field "C" dont save in table. why??????
there is no error and database item.
Kamran
|
|
|
|
|
Re: Calculation Mode Formula item... Cant Save WHY????? [message #160427 is a reply to message #160409] |
Sat, 25 February 2006 09:29 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Oh well ... just a little bit of reading on-line Forms help and everything is much clearer.
Go to the help system and search for "Creating a Calculated Item". In there, you'll find "Creating a calculated item Restrictions", which says:
Quote: | The following item properties are defaulted to NO at compilation time:
- database item
etc.
| Therefore, although the item "database item" property is set to Yes, it will be invalidated and at runtime your "c" item will be a control item.
In order to make your formula work, create a control item (for example "c_calc") (as suggested in the Help), make it a Formula column and enter the formula you want.
To store formula item value into the database, create PRE-INSERT trigger on the block; it will have only one line:
:block.c := :block.c_calc;
That should do it.
[EDIT]
By the way, Mohannad (in post #7) suggested you to read Help last Saturday. Being busy last week?
[Updated on: Sat, 25 February 2006 09:32] Report message to a moderator
|
|
|
|
|
|