Implement performance improvement for ScriptLibrary "context"

Idea ID 1766517

Implement performance improvement for ScriptLibrary "context"

Selecting only specified fields of a dbdict can speed up performance significantly - especially when a dbdict is mapped to multiple tables like dbdict cm3r, probsummary, rootcause, etc.

The ScriptLibrary "context" is used to select information from related record in other modules - i.e for related interactions to incidents, or parent changes to change tasks, etc. - so exactly this kind of dbdicts that can benefit most of such a performance improvement.

Example function in SL context to be improved:


function GetValue(name, tablename, field, returnfield)
{
var fRecord = new SCFile(tablename);
var sql = field + "= \"" + name + "\"";
fRecord.doSelect( sql );
return fRecord[returnfield];

}

 

Suggested implementation:

 

function GetValue(name, tablename, field, returnfield)
{
var fRecord = new SCFile(tablename, SCFILE_READONLY);

fRecord.setFields( [ returnfield ] );
var sql = field + "= \"" + name + "\"";
fRecord.doSelect( sql );
return fRecord[returnfield];

}

5 Comments
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor
Status changed to: Waiting for Votes
 
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor
Status changed to: Accepted

Great news, this idea has been accepted on our product roadmap, timing TBD. Check back for updates. (This is not a formal commitment, and subject to change)

Micro Focus Frequent Contributor
Micro Focus Frequent Contributor
Status changed to: Accepted
 
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

From Service Manager 9.63 applications, the implementation of the "context.GetValue()" function in ScriptLibrary is improved.

Micro Focus Frequent Contributor
Micro Focus Frequent Contributor
Status changed to: Delivered
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.