I want to make a calculation-field.
So I created two colums: INPUT and CALC
Now I want to make a simple calculation like: CALC=INP*2
I want the result to be showed in the CALC field and to be stored in de DB.
What is syntax?
Stored calc:
- create column “calc” in your table
2)create calculation with same name “calc”
(Servoy matches the two, and stores calc result in database
Unstored calc:
- only create calculation
notes:
-you can turn an unstored calc into a stored one by creating a column with same name.
-unstored and stored calcs always get refreshed when needed in GUI.
Sorry Maarten, it still does’nt work.
This seems more complicated than in filemaker, but I don’t give up (yet).
Now what I did step by step.
- Created column INP (value: number)
- Created column CALC (value: number)
- Created calculation CALC (value: number)
Indeed type STORED.
Now putting the calculation itself: line1: Return 1; (default)
line2: INP+2;
Testing: entering “5” in INP field: nothing happens in CALC field, it stays empty.
What went wrong?
PROBLEM SOLVED!
What went wrong?
Code was not correct.
shoud have been: line1: Return inp+2
But also I did’nt notice there were no recs in my database!
Also I had a look first in the CRM, for the code.