1

I'm using the following formula to prevent users from entering spaces on the article name field.

=ISERROR(FIND(" ",ArticleName))

The problem is the users have already entered data in this field prior to adding validation formula so the business owners want the validation formula to be implemented on new items only.

I know that I move my formula to the list validation settings however I'm having trouble combining 2 formulas. Below is my latest attempt

=IF(Created = "",ISERROR(FIND(" ",ArticleName)),TRUE)

So what I thought I was doing is if Created == Null then perform the formula validation otherwise return a value of true.

So basically I want to perform my space check validation on new items only. Is there a way I can do that?

0

You can use below formula

=OR(ISBLANK(Created),AND(NOT(ISBLANK(Created)),ISERROR(FIND(" ",ArticleName))))

People can hack this approach by first creating without space and then editing with space. To eliminate this use case you can add more logic which uses CREATED is less than 10/22/2014

  • Hey Amal thanks for the help and it appears your solution might work but 1 thing. 1. Is it possible to put some type of error message if the rule is violated? – Rahul Oct 22 '14 at 14:20
  • Yes you can use the list validation page "User Message" text block for that. – Amal Hashim Oct 22 '14 at 14:23
  • I tried that but the form just refreshes instead of showing the message – Rahul Oct 22 '14 at 14:27
  • It seems some javascript or other elements (CSS) is blocking the error message from getting displayed. – Amal Hashim Oct 22 '14 at 14:29
  • Oh well I guess the business user won't mind but I was wondering when I try to insert Created<"10/22/2014" like this =OR(ISBLANK(Created<"10/22/2014"),AND(NOT(ISBLANK(Created<"10/22/2014")),ISERROR(FIND(" ",ArticleName)))) The validation doesn't work. Why is that? – Rahul Oct 22 '14 at 14:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.