Announcement

Collapse
No announcement yet.

RTECALL: getnumber

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • RTECALL: getnumber

    Versions
    All

    Purpose
    Replaces the getnumb RAD application.

    Syntax
    Code:
    $L.success.flag=rtecall("getnumber", $L.return.code, $L.number, $L.class, $L.field)
    • $L.success.flag
      true = success
      false = failure
    • $L.return.code
      returncode of the call
    • $L.number
      The number/string returned
    • $L.class
      Class of number for which you are searching (from the number file).
    • $L.field
      Reserved for future use


    Example
    Code:
    $L.flg=rtecall("getnumber", $L.return.code, md.id in $mdeventlog, "mdeventlog", $L.field)
    Factors
    Establishes a lock called "getnumb"+$L.class+$L.field and waits until the lock is established.
    If the number class was not found, or if there are duplicates, it will return an error ($L.flg=false)
    Reads the current number.
    Increments/decrements by the step value (step defaults to 1)
    If incrementing and the number is greater than the reset value, it will use the start number (start defaults to 0)
    If decrementing and the number is less than the reset value, it will use the start number (start defaults to 0)
    New field called string.flg
    If string.flg is false, it will remain a numeric type
    If string.flg is true, it will convert the number to a string
    If string.flg is unknown, or the field isn't in the Database Dictionary (not added during an upgrade), the function checks for a prefix, a suffix or length. If any one of these exists, the function converts the value to a string. If none of these exist the function leaves the value as a number
    To convert the value to a string, the function uses the prefix, corrects the length of the number (padded with zeros on the left), and adds the suffix.
    The function eventually saves the new number to the file and returns it (converted to a string if necessary) to the user.
    Finally, it unlocks and returns.
    Best regards Tommy

    Please do NOT send me private messages asking for help with specific topics. I do not have the time. Post your question in the forums.

    Blog - - ITIL certified - HP Accredited Integration Specialist Service Manager v9

    ServiceNow Certified System Administrator - ServiceNow Certified Implementation Specialist - ServiceNow Certified Application Developer

    Want to keep this site alive? Consider making a donation. Click here.

  • #2
    Also confirmed in SM 9.33
    Title :The rtecall("getnumber") always returns "false" as a success flag
    Document ID :QCCR1E60558
    Product :service manager
    Version :9.20 , 9.30
    Classification :Known Problem
    Workflow Status :deferred
    In Plan :No
    Kind regards,
    fid509
    https://boincstats.com/signature/-1/user/38933/sig.png

    Comment

    Working...
    X