Dan
1
I have a defined key:
“Price”: “”
I need to distinguish between the key having the value 0 and being empty.
I tried various variations but can’t get it to work correctly.
It evaluate:
“visible_calc”: " this.model.Price == 0 "
as true.
I tied using jp.value and Price.length==0 but without success.
Suggestions?
Cheers.
delfs
2
Few things to point out:
null
, ""
and 0
are all different,
I think you are close, but you don’t need this
in there usually
model.Price==0 `// true if the value or Price is 0
Dan
3
removing the ‘this’ breaks the page (ie “visible_calc”: " model.Price == 0 " )
delfs
4
usually being the key word, but how and why are you using the this
?
Dan
5
I know this is legacy stuff, but removing seems to break things.
Using here:
{
“html”: “$0.00 + $0.00 (tax) = $0.00”,
“label”: “”,
“model”: “tab1”,
“styleClasses”: “col-md-4 text-right”,
“type”: “html”,
“visible_calc”: " this.model.Price == 0 "
}