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

Thread: *afind.string

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

    Talking *afind.string

    Has somebody a better method to serach a string in the whole system?

    It is nasty to use *afind.string several times on all relevant tables.

    I would like collect ideas for a function serachSystemComplete or so:

    -which input
    -which output (format with Array or Text Area, export to a file) etc.

  2. #2
    Junior Member
    Join Date
    Jun 2008
    Posts
    7

    Default Hope this helps

    // function which search for a string, something like *afind.string2
    //
    //findWhereAll("rb.dis.rel","format");
    functionfindWhereAll(stname,stwhere){
    var listWhere =newArray();
    var cmList =newArray();
    var curRecordPSC =newSCFile(stwhere);
    var query ="input=\""+stname+"\"";
    //var filename= stwhere;
    //print("stname"+stname);
    //print("stwhere"+stwhere);
    var findRecordInPSC =curRecordPSC.doSelect("input=\""+stname+"\"") ;
    var count =system.library.rbcCommon.getRecordCount(stwhere, query);
    print("COUNT"+ count);
    if(findRecordInPSC == RC_SUCCESS) {
    for (var i=0;i<count.getText();i++){
    //print("inside for loop");
    listWhere[i]= curRecordPSC.name.split+"\n";
    cmList[i]= listWhere[i].split(",");
    var nextRecord =curRecordPSC.getNext();
    }
    print("SUCCESS");
    }
    else{
    print("ENTERED STRING NOT FOUND");
    }
    print("ENTERED STRING FOUND IN:\n"+ listWhere+"\n");
    }

+ 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