|
Write variables with a zero value Alistair Nicoll from New Zealand [2 posts] |
6 year
|
Hi Steven,
I'm using the Write_Variables function to create a CSV file of the number of labels I've detected on fruit. It works fine if the number is >1. However if there are zero labels I don't get a zero in the log file, I just get "". I tried logging other variables as well and any number that was a zero got the same result. Any number greater than zero logged correctly.
What am I doing wrong?
Thanks,
Alistair.
|
|
|
Steven Gentner from United States [1446 posts] |
6 year
|
Alistair,
Within RR there isn't a restriction of type ... which allows a variable to contain a zero or a null string. So a "" is treated the same as 0. I.e. the variable has NO value.
To resolve this you can check the variable prior to saving it for a "" and then set it to 0 or "0" which will then cause it to log the digit. You can probably use a If_statement module or the VBScript module to check for this issue prior to the Write_Variables module.
STeven.
|
|