Want to get rid of Google Ads, click here.
+ Reply to Thread
Results 1 to 4 of 4

Thread: Doing rtecall("count") from JavaScript

  1. #1
    Junior Member
    Join Date
    Mar 2006
    Location
    Stavanger, Norway
    Posts
    10

    Default Doing rtecall("count") from JavaScript

    This might well be bloody obvious for you guys, but I just now figured out how to do a rtecall("count") from JavaScript.

    Code:
    function getRecordCount(filename, query) {
    var dummy = new SCDatum(); var countResult = new SCDatum(); var rc = new SCDatum(); var flag = system.functions.rtecall("rinit", dummy, rc, filename); var flag = system.functions.rtecall("count", dummy, rc, query, countResult); return countResult.getText();
    } var r = getRecordCount("operator","name#\"F\""); print("there are "+r+" operators whose name begins with F"); r = getRecordCount("operator","true"); print("there is a total of "+r+" operators");

  2. #2
    Administrator tommy's Avatar
    Join Date
    Nov 2001
    Location
    Copenhagen
    Posts
    4,272

    Default

    Thanks.

    I actually wrote another script to do the same. Except it looped through all records and counted records that way.
    Best regards Tommy
    Blog - - ITIL certified - Accredited Integration Specialist – HP OpenView Service Management

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

  3. #3
    Junior Member
    Join Date
    Mar 2006
    Location
    Stavanger, Norway
    Posts
    10

    Default

    Quote Originally Posted by tommy View Post
    Thanks.

    I actually wrote another script to do the same. Except it looped through all records and counted records that way.
    Yeah, me too. A bit of a pain for wide queries towards incidents or probsummary.

  4. #4
    Senior Member tuncay's Avatar
    Join Date
    Jul 2004
    Location
    Germany
    Posts
    113

    Question performance

    what is about the performance between these handlings ???

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts