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

Changing the variable Type

dvelloriy
Kilo Sage

Hello All,

We have a variable (Type = Single line text) being used across different catalog items.

The requirement is to change the type to drop-down values (drop down values should be coming from Location table's Country column). Now the problem is Location data is not normalized. Like Country data has country codes as well as country names like BRA, Brazil, IND, India etc. Reference qualifier should pull just country codes. How can we achieve that?

 

Also, in general is it ok to convert the variable data type from single line text to Choice? will it create any issues like data loss in exisiting records. Note: Exisiting records contains full country names as well. So when we change the variable type, will it create any issues?

 

Please advise.

2 REPLIES 2

Zach Koch
Giga Sage
Giga Sage

Here is a link to a KB article that applies to variables as well. It is HIGHLY recommended to create a new variable and not change the type as data loss will occur.

Changing field type or column datatype 

As far as the reference qualifier, it sounds like you're going to need an Advanced one with a Script Include, with possible RegEx to strip out unwanted pieces of data, or to clean up your Location data.

 

If this information helped resolve your issue, please remember to mark response correct and thumbs up to help future community members on this information, thanks!

Sumanth16
Kilo Patron

Hi @dvelloriy ,

 

Please refer to below thread:

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0712394

If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!

 

Thanks & Regards,

Sumanth Meda