The Zurich release has arrived! Interested in new features and functionalities? Click here for more

how to override the template field values

kamleshrathore
Kilo Contributor

Hi Team ,

i have template in the record producer and the two fields also " SAP CI Instance "   and "Approved Assignment Groups"

this two also consist in the template once i submit the record producer then template value is populating in   the " SAP CI Instance " and "Approved Assignment Groups"

in the change form but if in the record producer if i am taking different " SAP CI Instance " and "Approved Assignment Groups" to the template values

then i want to override the template fields values by the " SAP CI Instance " and "Approved Assignment Groups"

find_real_file.png

for example:

in the template

SAP CI Instance   = SAP 4.0b BW

Approved Assignment Groups= BD APPS BDX-ECC-TECH-BI

And from fields i am selecting different value

SAP CI Instance   = SAP ECC TECH DEV

Approved Assignment Groups= CAP-ECC-TECH-DEV

then in the form fields values should override the template values

currently if it is taking the values only from the template not from the fields

find_real_file.png

please help me how to do          

2 REPLIES 2

Geoffrey2
ServiceNow Employee
ServiceNow Employee

When you apply a template to a record it will override whatever is there.   It's kinda what it's supposed to do and there isn't a way you can specify what fields to ignore.


What you really need to use is default values.   Set the default value of SAP CI Instance to SAP 4.0b BW.   Then if the User selects a different value for SAP CI Instance, then the value they select will be populated into the field.   And SAP 4.0b BW will only be populated if the User didn't select anything.



If you really hard-core wanted to stick to using templates, then you would need to use code to record the value of every field in the record, then apply the template with the code, then go through all your stored values and see if you need to override any template values.   Sounds exhausting.


could you provide me some code details


so that i can modify and do accordingly