REQUEST A DEMO

Find-By-ID Enhancement

One of my Clarify users asked for this enhancement:

The
numbering system for Cases, PR’s and Solutions in our system use a
letter prefix – CS of cases, PR for part request, and so on. When you
do it a dozen times in a day, it’s really annoying to keep getting “No
case with id PR12345” when you forgot to change the dropdown to “Part
Request”.

The Find-By-ID interface on the left side of the console can be adjusted with just a few lines of JavaScript.


Add this to the find_by_id() function in console_left.asp:

//
//Testcases:
// Select PR Detail and enter PR28970-1 – should get PR Detail
// Select PR Detail and enter 28970-1 – should get PR Detail
// Select PR Detail and enter CS38187 – should get Case
// Select PR Detail and enter PR28970 – should get PR Header
// Select PR Detail and enter 38187 – should get error, no PR of this title (yet)
//
// Select PR Header and enter PR28970-1 – should get PR Detail
// Select PR Header and enter 28970-1 – should get PR Detail
// Select PR Header and enter CS38187 – should get Case
// Select PR Header and enter PR28970 – should get PR Header
// Select PR Header and enter 38187 – should get error, no PR of this title (yet)
//
// Select Case and enter PR28970-1 – should get PR Detail
// Select Case and enter 28970-1 – should get subcase of this title if it exists
// Select Case and enter PR28970 – should get PR Header
// Select Case and enter CS38187 – should get Case
// Select Case and enter 38187 – should get Case

// If there is a dash, it’s a subcase or a PR detail
if(id.indexOf(‘-‘)!=-1)
{
if(obj_type == “demand_hdr”) obj_type = “demand_dtl”
if(obj_type == “case”) obj_type = “subcase”
}

if(obj_type == “demand_dtl” && id.length == 7)
{
if (id.indexOf(‘-‘)!=-1)
{
// default to PRxxxxx if all they enter is xxxxx-y
id=’PR’+id;
}
else
{
// no dash, must be the PR header they wanted
obj_type = “demand_hdr”;
}
}

// default to CSxxxxx if all they enter is xxxxx
if(obj_type == “case” && id.length == 5) id=’CS’+id;

if (id.indexOf(‘CS’)!=-1)
{
// Sometimes they enter CSxxxxx but have Part Request selected by accident
if (id.indexOf(‘-‘)!=-1) obj_type = “subcase”;
else obj_type = “case”;
}

if (id.indexOf(‘PR’)!=-1)
{
// Sometimes they enter PRxxxxx but have Case selected by accident
if (id.indexOf(‘-‘)!=-1) obj_type = “demand_dtl”;
else obj_type = “demand_hdr”;
}
//

Kristina E. Pereyra
Therma-Wave Inc.