Defaulting Values on Change Model

awilkerson
Tera Contributor

I am attempting to default the category and subcategory on specific change models. The issue I run into is that they are set to read only when I do. I simply need to default them and not set for the duration. 

What I have tried:

1. The record preset method. The values are ready only on create and submit.

2. I have also tried the UI policy. The UI policy adds another issue in that we have a script include that triggers off the category. Once I set the category, the subcategory is empty. The category is set to read only. 

6 REPLIES 6

Chaitanya ILCR
Kilo Patron

Hi @awilkerson ,

you can create an onLoad client script 

or you can update the dictionary default value (with some script)

 

ChaitanyaILCR_0-1753795761748.png

 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @awilkerson 

 

Did you try setting it as the default at the model level itself, like shown below?

 

 

DrAtulGLNG_1-1753797785067.png

 

*************************************************************************************************************
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]

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

I did. That worked except for the fact that those values are now read-only. I need the ability to change them. 

Hi @awilkerson 

Now it's becoming contradictory. On one hand, you're saying you want to prefill values from the model to reduce manual effort, but then you're also saying you want to change those values later — which means you're not happy with what the model is providing.

If that's the case, then you shouldn't set that value in the model at all and instead ask the user to input it manually. The purpose of using a model is to reduce the time and effort required to fill out a change record — and it seems like you're trying to override that, which could lead to breaking the intent of the model.

My suggestion: think it through. Either use the value in the model or keep the field open for manual entry — but mixing both approaches will only create technical debt.

*************************************************************************************************************
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]

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