how to populate of catalog item variable info to ritm short description when requesting catalog item

AJAYKUMAR G
Tera Contributor

how to populate of catalog item variable info to ritm short description when requesting catalog item

1 ACCEPTED SOLUTION

@AJAYKUMAR G 

try this

current.short_description = 'Variable value is ' + current.variables.variableName;
current.setWorkflow(false); // to avoid triggering BR
current.update();

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

9 REPLIES 9

after insert BR on RITM table provide script

@AJAYKUMAR G 

try this

current.short_description = 'Variable value is ' + current.variables.variableName;
current.setWorkflow(false); // to avoid triggering BR
current.update();

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

surajnikam111
Tera Guru
Tera Guru

Hi @AJAYKUMAR G ,

 You can use Get catalog variables action to update your RTIM short description.  Please see below SS.

surajnikam111_0-1737450644166.png

 

Regards,

Suraj 

 

Ankur Bawiskar
Tera Patron
Tera Patron

@AJAYKUMAR G 

if you are using flow then check this link

Issue with setting short description with variables in flow designer 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

AparnaSahu
Tera Guru

Create a Business Rule

When to run - Before, Insert

In script section add-

var variables = current.variables.getElements();
var str = ''";
for (var i = 0; i < variables.length; i++) {
    var question = variables[i].getQuestion();

// identify any component that uses html tags and skip it if found
    if(question.getLabel().includes('<') || !question.getDisplayValue()){
        continue;
    }
    var variableLabel = question.getLabel();
    var variableValue = question.getDisplayValue();
    str = str + variableLabel + ' - ' + variableValue + '\n';
}

current.description = str;
 
Please mark helpful, if it works. Thanks!