Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Is there a best practice for naming values for a select box variable?

tinayang15
Tera Expert

I have a variable on a form that is a select box. What is the best practice for question choices' values?

Ex. I have a select box question that asks, "What department is this question related to?". I have question choice - Text labeled Information Technology. For the question choice - Value, what would be best to put? I've seen developers put in for question choices, the Value as a number (ie - 1, 2, 3), Information Technology just like the Text, or information technology lower cased. 

Is there a best practice?

tinayang15_0-1738268302876.png

 

1 REPLY 1

jcmings
ServiceNow Employee

Personally, I would set the value as information_technology. The value is mainly important if you are mapping the field to a back-end field (e.g. automatically using the Map to field checkbox, or via a flow or something). I would also encourage you to look into shifting this into a reference field, since there is an OOTB Department table (cmn_department).