I added a Textbox and a Numeric textbox to a canvas.
When I looked at the vartype of the value, they both show “C”.
I expected the Numeric textbox to be “N”.
The Numeric textbox accepts digits and is formatted to right-align, but still contains text and has a character ‘value’. A spinner can be used to hold numeric values.
If I click and drag a numeric table field into a section, a numerictextbox will be auto created. However, the alignment is left. Changing the text alignment attributes does not seems to have an effect, so is there anyway to change to right align?
In the web client the digits are left aligned, but in the desktop client, setting ‘Text alignment’ to right (or center) should control the data text alignment.
effect only applies to desktop.
What is the best way to get a numeric value out of an input box
var mynum = parseInt(Lianja.evaluate("inputbox('Please enter number','Number','')"));
var mynum = parseInt(prompt('Please enter number','','Number'));
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.
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?
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.
My calculation in this case is complex
Can the expression call a server procedure in server too using Lianja.Evaluate()?
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.