+1 for @pböttcher:
Using NULL for calculations may produce unexpected results, I totally agree, see simple example in SQL:
- chrome_bHPwdWloWX.png (61.53 KiB) Viewed 1714 times
But on the other hand we can see from the screenshot that you don't have NULLs in the
selected fields of that specific row.
Narrow down
Did you check if your calculation gets executed at all? Maybe change SQL to
Code: Select all
SELECT id FROM %TABLENAME% WHERE id='%ID%'
and check if every record contains the record's id after loading the TV.
PS: After Re-reading the thread and pböttchers answer above, I guess this is what he wanted you to check by asking you to change the value in DB and then reloading the AppGini DV. Reloading should overwrite the DB-value, he's totally right. This here is just a different approach for testing execution.
Sidenote: Datatype integer?
I'm wondering if datatype
integer is suited for the result of division by 5 of a sum of integers. I guess changing to double/float/decimal datatype will not solve your problem, because division by 5, casted to integer should just cut decimals but should not result in NULL.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readability
AppGini 24.10 Revision 1579 + all AppGini Helper tools