Evaluator - how do I use value when it is empty (unspecified error)

Making an evaluator group for width, trying to put the 'Unspecified' values in a group with another name (these show as empty in the script log with no type)
these do not work

if (value == null)
if (value == undefined)
if (value == 0)

how do I trap value when it is empty please ?

UPDATE:
strange behaviour
if the column (width) is set as default then the script log when outputting value will only display items with a value - sometimes ? (when grouping is turned off and on again)
If it is not set as default then the script log will show those items without a value as empty, like so
image

here is the width evaluator group that works when not set as default

<?xml version="1.0"?>
<evalgroupscheme desc="Width" reverse="no" scheme_name="Width" sort="no">
	<eval>Output(value);

groupName = &quot;Not an Image&quot;;
orderOut = 0;

if (value &gt; 0) { groupName = value; orderOut = value; }
else { groupName = &quot;Not an Image&quot;; }

groupName = groupName as &quot;%-15&quot;;

return [name = groupName; order = orderOut;];</eval>
	<groups enable="no" />
</evalgroupscheme>

Two ways that should work:

if (Len(value) == 0)
if (!value)

Neither works when the column is set to default.

What happens?

mentioned above in 'UPDATE', to sum up there is no value for unspecified items if the column is set to default.

Do you mean your scheme isn't called at all?

The scheme is called,
this is the result when the width column is set as default in the group scheme
image
image
this is the result when the column is not set as default
image

  • if default is set I cannot trap values that are unspecified.

update
Directory Opus 13.0.49 (Beta) Build 8726 x64
OS 10.0 (B:19045 P:2 T:1) SP 0.0

This issue still exists.

There is another method of triggering the error.
(The error being that the 'unspecified' items cannot be trapped and put into a group)

  • here the width column is used as an example.
  • make sure 'Replace default group behaviour' is off (if it is on it will trigger the error)
  • The following evaluator code works as expected
if (value > 0) { groupName = value + " pixels"; orderOut = value; }
elseif (Len(value) == 0) { groupName = "Not an Image"; orderOut = 0; }

groupName = groupName as "%-15";

return [name = groupName; order = orderOut;];
  • now change the elseif to else - the 'unspecified' error is triggered

The problem seems to be not that value is empty or not, but that when the scheme is set as default, non-relevant values are not passed at all.

More visible if you change:
Output(value);
For this:
Output("file:"+fullpath+"; value:"+value);
When the scheme is set as default, any non image are not listed.
As a sidenote, when testing, in some folders, the columns are calculated more than one time. And sometimes non images files appears except the last time.

Ok I think I've finally been able to reproduce this, hopefully fixed in the next beta.