Catalog variable of Integer - numbers only

Trish Mac
Mega Guru

I'd like to create a catalog variable that allows numbers only and this doesn't appear to be available OOB.  When I search the Community, people are using a variety of scripts for this.  Does something this common really require a script?

Thanks,

Trish

2 ACCEPTED SOLUTIONS

Hello @Trish Mac 

I'm unsure where our disconnect may be, as this is seeming to be more complex than it should be, haha.

 

With that said, what your screenshot provided originally, it did not appear to be saved because you still had the * asterisk icon showing on the "Question" tab, thus telling us it probably wasn't saved. Although, I think if you just filled in the "Question" tab mandatory fields, that may help with more showing in the "Type specifications" tab...so you may want to try to ensure you have all mandatory fields filled in.

 

In any case, unless you all are on some sort of very, very, very old version of ServiceNow...what I'm talking about has been in the system for several versions now.

 

I'll include two screenshots of the settings I just did (again) for you to verify against what you have. You should be able to see more than what your past screenshot shows within the "Type Specifications" tab. If you're still not seeing more there, I would recommend to delete the variable...and try again...or lastly, contact ServiceNow support as something is broken on your end.

 

AllenAndreas_0-1714423332018.png

 

AllenAndreas_1-1714423352734.png

 


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

Hi,

Glad you were able to see those fields. Out of box, they should all be there so that's a bit concerning that the form was customized that much to have those removed. I would recommend perhaps comparing your catalog item form and tabs to an out of box instance, just to help suggest to whomever if there should be any other fields added or removed from view.


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

13 REPLIES 13

You need to save that variable first to be able to see the options under Type Specifcations

It is saved.  And Catalog item updated as well.  Do you mean something else by "Save"?

 

Thanks,

Trish

Hi @Trish Mac 

Yes, please save the variable as the type, so that the form registers that and then further selections will appear. The screenshot I took was from that exact variable type, etc. Please proceed.


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Trish Mac
Mega Guru

I'm not sure what you mean.  My image shows Single Line Text as the variable and it is both saved and Updated within the Catalog item.  When I then click on the Variable Name and go to Type Specifications, I still see what is showing in the image above. 

Hello @Trish Mac 

I'm unsure where our disconnect may be, as this is seeming to be more complex than it should be, haha.

 

With that said, what your screenshot provided originally, it did not appear to be saved because you still had the * asterisk icon showing on the "Question" tab, thus telling us it probably wasn't saved. Although, I think if you just filled in the "Question" tab mandatory fields, that may help with more showing in the "Type specifications" tab...so you may want to try to ensure you have all mandatory fields filled in.

 

In any case, unless you all are on some sort of very, very, very old version of ServiceNow...what I'm talking about has been in the system for several versions now.

 

I'll include two screenshots of the settings I just did (again) for you to verify against what you have. You should be able to see more than what your past screenshot shows within the "Type Specifications" tab. If you're still not seeing more there, I would recommend to delete the variable...and try again...or lastly, contact ServiceNow support as something is broken on your end.

 

AllenAndreas_0-1714423332018.png

 

AllenAndreas_1-1714423352734.png

 


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!