if not exists
(
selects "FullChargeCapacity from DCIM_Battery" of wmis "root\dcim\sysman"
)
then ERROR "UNKNOWN" else
(
(
item 0 of it * 100 / item 1 of it
)
of
(
integer value of property "FullChargeCapacity" of it, integer value of property "DesignCapacity" of it
)
of select objects "* from DCIM_Battery" whose
(
exists integer values of properties "FullChargeCapacity" of it AND exists integer values of properties "DesignCapacity" of it
)
of wmis "root\dcim\sysman"
)
if not exists (selects "FullChargeCapacity from DCIM_Battery" of wmis "root\dcim\sysman") then ERROR "UNKNOWN" else ( (item 0 of it * 100 / item 1 of it) of (integer value of property "FullChargeCapacity" of it, integer value of property "DesignCapacity" of it) of select objects "* from DCIM_Battery" whose(exists integer values of properties "FullChargeCapacity" of it AND exists integer values of properties "DesignCapacity" of it) of wmis "root\dcim\sysman" )