Populate values from problem form to a new field in known error form

charity_ogbo
Tera Contributor

Hello

 

Can I populate the fix notes on my known error form with the fix notes filed on the problem form.  

 

The fix notes on the known error form was added just added and we just want to auto populate it with whatever values we have entered in the program form fix note field. 

 

problem form  field name is fix_notes

KE form field name is kb_fix_notes

charity_ogbo_0-1692128945760.png

 

charity_ogbo_1-1692129168435.png

I have seen similar questions in the community but no clear solution

 

Can I get you experts to assist. 

1 ACCEPTED SOLUTION

_William_Knight
Kilo Guru

Business Rule will not work for this. I ran into a similar issue and you need to map the required fields, that is now service now is going it 

Go to https://dev167958.service-now.com/csm_field_map_list.do , of course replace dev167958.service-now.com with you url and located known error > select new and map desired field 

 

_William_Knight_0-1692203716921.png

Please, don't forget to mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!

 

Regards,

Will

View solution in original post

3 REPLIES 3

Tushar
Kilo Sage
Kilo Sage

Hi @charity_ogbo 

 

Yes, I think you can achieve this by using a Business Rule or a Script Include in ServiceNow.

 

you can auto-populate the kb_fix_notes field in the Known Error (KE) form with the fix_notes field from the Problem form:

 

You can create a Business Rule and provide your conditions as per your requirement that triggers when a new Known Error record is inserted.

 

something like this -

 

 

(function executeRule(current, previous /*null when async*/) {

    var problemGR = new GlideRecord('problem');
    if (problemGR.get(current.problem)) {
        current.u_kb_fix_notes = problemGR.u_fix_notes; // Update the field name accordingly
    }

})(current, previous);

 

 

Please, don't forget to mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!

Regards,
Tushar

Thank you for your help

 

This is what I did but still cannot seem to populate the fix notes

charity_ogbo_0-1692191493316.pngcharity_ogbo_1-1692191557062.png

 

_William_Knight
Kilo Guru

Business Rule will not work for this. I ran into a similar issue and you need to map the required fields, that is now service now is going it 

Go to https://dev167958.service-now.com/csm_field_map_list.do , of course replace dev167958.service-now.com with you url and located known error > select new and map desired field 

 

_William_Knight_0-1692203716921.png

Please, don't forget to mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!

 

Regards,

Will