Validate a Single line of text column type of list in sharepoint 2010 to accept only numbers?

自闭症网瘾萝莉.ら 提交于 2019-12-22 11:02:03

问题


How to validate a Single line of text column type of list in sharepoint 2010 to enter accept only numbers?

Please don't tell me to use calculated column , I tried it and it didn't work for me as i want.

Please advice, thanks in advance.


回答1:


This should work:

=ISNUMBER([MyColumn]+0)



回答2:


Here is what seems to work for me (building on @Rob_Windsor; newlines added for readability):

=AND(
  ISNUMBER(Number+0),
  ISERR(FIND(".",Number)),
  ISERR(FIND(",",Number)),
  ISERR(FIND("$",Number)),
  ISERR(FIND("+",Number)),
  ISERR(FIND("-",Number)),
  ISERR(FIND(" ",Number))
)



回答3:


I went through the available functions and I don't see one that will validate whether a text value is a number.

BTW, is there a reason you are not using a Number field instead of a Single line of text?



来源:https://stackoverflow.com/questions/5979782/validate-a-single-line-of-text-column-type-of-list-in-sharepoint-2010-to-accept

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!