Q: How do I display the actual number without having it being rounded? a numeric database value being displayed in a canvas textbox.
If the value saved is 523.65, the displayed value is 524.
A:
ALLTRIM(STR(TOTALDUE,10,2))



Q:
My form section has calculated fields whose values are computed based on records in other tables
May I know where should I put code to perform the actual calculation and to refresh the calculated values when records in those tables are changed?
A:
Any field in a form section that has an expression as its data source is automatically a calculated field. It will be calculated and displayed any time you navigate data.
Look at the section and field attributes and you will find attributes that tell Lianja to recalc and redisplay calculated fields automatically as you perform data entry.
Also, grids can have calculated columns as well as horizontal and vertical totaling and subtotaling with conditional color coding of the grid cells.
Q:
My calculation in this case is complex
Can the expression call a server procedure in server too using Lianja.Evaluate()?
A:
Yes. The data source can be a function call which is executed on the server. Just remember that in a web / mobile app, this is a client / server architecture so the server knows nothing about the context of what you are doing on the client. You should therefore substitute data context as parameters to the remote function call using {...} macros or else call a client side javascript function that builds the parameters up and the uses Lianja.evaluate() to make the remote function call.

Added a new field (form and canvas sections) attribute "Recalculate". When data is entered into a field interactively any readonly or calculated fields are automatically recalculated and re-displayed. This is typically used to calculate totals e.g. if you have three columns; Quantity,Price,Cost and "Cost" is calculated by quantity*price, then as you change either quantity or price the "Cost" field will be recalculated and refreshed.



​All topics in [Answers] alphabetically:http://www.lianja.com/community/show...ll=1#post12352