Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Auto populate value is empty in RITM But visible in form.

Sumitha Devi
Tera Contributor

SumithaDevi_0-1739975215475.png

Hello, 

This is the configuration, The value is visible in the form( reference field).  But After submitting It is empty in RITM.



 

3 REPLIES 3

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi  @Sumitha Devi  

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0746243

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Ankur Bawiskar
Tera Patron
Tera Patron

@Sumitha Devi  

are you sure on RITM the reference variable is populated or not?

if it's empty then the other variable won't show value

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

sunil maddheshi
Tera Guru

@Sumitha Devi  

 

  • Ensure that the reference field is mapped correctly in the catalog item’s variables.
  • If you are using a reference qualifier, ensure that the field is pulling data correctly.

Moreover you can write before insert business rule on sc_req_item table

 

(function executeRule(current, previous /*null when async*/) {
    var ritmGR = new GlideRecord('sc_item_option_mtom');
    ritmGR.addQuery('request_item', current.sys_id);
    ritmGR.addQuery('sc_item_option', '<YOUR_VARIABLE_SYS_ID>'); // Replace with your actual variable sys_id
    ritmGR.query();

    if (ritmGR.next()) {
        current.u_department_name = ritmGR.getValue('value'); // Ensure field exists on RITM
        current.update();
    }
})(current, previous);

 

Please mark correct/helpful if this helps you!