Quoting in calculated items

The items we referenced had relatively simple keys: one or two parameters and no quoting. When the referenced items get more complicated, it's a common mistake to get quoting wrong. That, in turn, makes the item not work properly or at all. Let's look at the formula that we used to calculate free disk space:

last("vfs.fs.size[/,total]")-last("vfs.fs.size[/,used]") 

The referenced item keys had no quoting. But what if the keys have the filesystem parameter is quoted like this:

vfs.fs.size["/",total] 

We would have to escape the inner quotes with backslashes:

last("vfs.fs.size["/",total]")-last("vfs.fs.size["/",used]") 

The more quoting the referenced items have, the more complicated the calculated item formula gets. If such a calculated item doesn't seem to work properly for you, check the escaping very, very carefully. Quite often users have even reported some behavior as a bug that turns out to be a misunderstanding about the quoting.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.111.183