Need help with validation formula for document list in Sharepoint list

Copper Contributor

I am trying to apply validation to document title column, we replacing spaces in title with dashes manually, Validation should fail if it cant find dash in title column, but only want to apply it to new items and not to existing items. So Title needs to contain "-" if thats true all good no need to check created date, But if dash is not found it should check wheter the Document [Created] date is less than today, if its less than today then all good, but if created date is equal to today then validation should fail.

 

This is the formula i have tried so far but it doesnt seem to work

 

=IF(FIND("-",Title),TRUE,IF(Created<TODAY(),TRUE,FALSE))

1 Reply

@BhushanJ935 
Made a slight adjustment to properly check the conditions. Here's a revised version of your formula:

=IF(ISNUMBER(FIND("-",Title)), TRUE, IF(Created < TODAY(), TRUE, FALSE))

This formula works as follows:

  1. ISNUMBER(FIND("-",Title)) checks if the dash "-" is found in the Title. If it is found, the formula returns TRUE.
  2. If the dash is not found, the formula then checks if the Created date is less than today using Created < TODAY(). If this condition is true, it returns TRUE; otherwise, it returns FALSE.