Quote:
Originally Posted by chaley
Your problem comes from confusing constants with field (column) values. The string '#chapters' is a constant. It always has the value '#chapters', which as you can see is not a number. To get the value of a metadata field you use the 'field' function. This function takes the name of the field as its first argument. This argument is normally a constant, but certainly does not need to be.
|
Thanks, I didn't know I had to use the 'field' function. Although the description in the reference section of the manual doesn't sound like how you described it (getting the value from the metadata field).
Quote:
Finally, if there is any chance that the #chapters field is empty (zero) then you need to test for that before doing the divide.
|
Although, I try to make sure that empty chapters fields get a 1, the last code you gave me works perfectly.
Thanks.