$incDocumentItem

Adds the specified decimal value and the value of the named document item.
Syntax
    $incDocumentItem{document_item_name}{decimal_value}
DocumentationAdds the specified decimal value and the value of the named document item:

    Parameters:
      document_item_name, the name of the document item whos value is to be incremented.
      decimal_value, an optional parameter that defaults to 1 and represents the incrementation amount of the document item's value.
    Throws:
      an java.lang.IllegalArgumentException if the named document item does not exist.
      an java.lang.NumberFormatException if 'decimal_value' or the value of the document item are not numeric decimal.
Examples
The following expression increments the value of the document item named 'value'

    $if{$existsDocumentItem{value}}
      {
      $incDocumentItem{value}
      }
    and is equivalent to the expression

    $if{$existsDocumentItem{value}}
      {
      $setDocumentItem{value}{$add{$getDocumentItem{value}}{1}}
      }
    or equivalent to the expression

    $if{$existsDocumentItem{value}}
      {
      $setDocumentItem{value}{$inc{$getDocumentItem{value}}}
      }
The following expression substracts the value of the document item named 'value' and the number 7

    $if{$existsDocumentItem{value}}
      {
      $incDocumentItem{value}{7}
      }
    and is equivalent to the expression

    $if{$existsDocumentItem{value}}
      {
      $setDocumentItem{value}{$add{$getDocumentItem{value}}{7}}
      }
    or equivalent to the expression

    $if{$existsDocumentItem{value}}
      {
      $for{$set{counter}{0}}{$less{counter}{7}}{$incLocal{counter}}
        {
        $setDocumentItem{value}{$inc{$getDocumentItem{value}}}
        }
      }
GroupMath
Minimum required transaction-mode:UPDATE=TREE
Required scripting permission of the developerPERMISSION_FL_BASIC
Minimum parameters1
Maximum parameters 2