How to Auto-populate field value in the related list form

Vivek13
Tera Contributor

Hi,

I have created a string field WOT number in the cmdb_ci_storage_device form and I have brought the related list storage device in the work order task, When I click on new in the storage device related list of the work order task form, the current number of the work order task must be populated in the WOT number field which is available in cmdb_ci_storage_device form. How can I do this?

1 ACCEPTED SOLUTION

Hi Vivek,

I would recommend using a reference field instead of string field; in that way the relationship would come automatically and the parent field would be set automatically

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

View solution in original post

8 REPLIES 8

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Vivek,

That should happen out of the box since you have parent and child relationship via the reference field.

you need to chose and add the related list that comes automatically to the form. can you check the form layout of the wm_task table

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

Hi @Ankur Bawiskar,

Sorry I have changed the custom WOT number field to a string field now. How do I auto-populate the original number of the work order task to that custom field.

 

Thanks

 

Hi Vivek,

I would recommend using a reference field instead of string field; in that way the relationship would come automatically and the parent field would be set automatically

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

I have changed it to reference again but its not getting auto-populated. Please help