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
Mega Sage

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).