Hi
I'm investigating a new strange behavior of PB2022. I've never seen it in previous PB versions. It looks like
computed.expression='0.7' is sometimes interpreted as '0'. It looks like the part after the dot is cut off. Regular columns are not affected. Only computed fields.
It seems to be dependent on combination of user's locale, global locale and default non-unicode character set and such internal state of the computer.
It's happening randomly but when it starts happening it's there until the computer restart.
I'm working on it but currently I'm not able to create a minimal proof.
Code:
decimal ld_ret
datastore luo_store
luo_store = CREATE datastore
luo_store.dataobject="d_expr_bug"
luo_store.InsertRow(0)
luo_store.Modify("create compute(band=detail x='8' y='8' height='56' width='178' name=test expression='0.7')")
ld_ret = luo_store.GetItemDecimal( 1 , "test" )
ld_ret should be 0.7 now. But sometimes it's 0.
It may be a DLL mismatch. But I've checked pbdwe dependency and it looks OK.
Have you seen this or similar bug?
EDIT: Tested on 1892. I see there's a new version there so I will check it tomorrow.
You need to use the ~t in the Modify() command. For example:
modstring = "emp_id.Color='16777215 ~tIf(emp_status=~~'A~~',255,16777215)'"
HTH
Regards ... Chris
Sorry but I don't understand you.
You wrote:
"When you create a CC in the DW Painter graphically - you will see that all expressions are optional (not required)."
How can I do it?
If I click OK I get error:
---------------------------
DataWindow
---------------------------
NULL expression is not valid.
---------------------------
OK
---------------------------
If I click Cancel then the column disappears.
Am I overlooking something? There may be some setting in PB which allows me empty expressions but I don't know about it. And I remember expression has been required since PB 5.