Number field upper and lower bounds | Community
Skip to main content

Number field upper and lower bounds

  • April 14, 2023
  • 5 replies
  • 0 views

Is there plans to support upper and lower bounds on a number field. 

Example;

lower bound = 0

upper bound  = null

This would enforce the user input of a positive number

5 replies

Dan12
  • April 19, 2023

Could this be handled by a regex field?

for example:

^[1-9]\d*$

should prevent nulls and negative numbers. Could tweak it further depending if you need to capture numbers with a decimal place. 


  • Author
  • April 20, 2023

Will a regex field be limited in the future or will it be able to be used like the Number field. If custom objects are able to be used in other areas of Zendesk in the future will using a REGEX file limit us ?


Dan12
  • April 21, 2023

It would be able to accept any input that matches the regular expression it's configured with. In the example above, if that field was used, it would accept any positive, non-null number. I'm not sure what you mean when you're asking if it will be limited - what kind of scenario are you envisioning?


  • Author
  • April 21, 2023

If in the future if Zendesk gives further capabilities like Explore, Trigger, Automations, or something else for the new Custom Objects will we be limiting ourselves by using REGEX or do you think it will not be an issue. 

Will ZIS function with the new Custom Objects if we used the REGEX field or will we have to convert the value from a REGEX or string to a number or other to make it work?

 


Dan12
  • April 21, 2023

Ah. I'm not sure, I don't have any more insight into future plans than any other user.

The regex field data itself is likely saved as a string, so you may need to convert from string to integer if you're using it in ZIS, but otherwise, I can't think of anything else to watch for.