# Date and Text Field Validation

Question asked by andreapasutti on May 31, 2017
Latest reply on Jun 5, 2017 by andreapasutti

I'm looking for advice as to how to best implement a solution.

I need to take a written timeframe and evaluate it as a number so I can validate it. I have a task review list with the following fields/types:

Start Date/Date and Time

Due Date/Date and Time

End Date/Date and Time

Review Frequency/Lookup

Reminder Frequency/Lookup

This combination of Start Date/Due Date/Review Frequency/Reminder Frequency allows the users a great deal of flexibility in creating tasks. You can create a task that starts quarterly, is due within 30 days, and sends reminders each week. Or create a task that starts each week, is due within 3 days, and sends reminders every day. Very nice.

• I have a calculation that determines the number of days between the Start Date and the Due Date (Total Days). The Review and Reminder frequencies are lookup columns to a list that has values assigned to each choice (once = 1, weekly = 7, monthly = 30, etc.).

• I need a rule on the Review Frequency dropdown field so that the user can't select a Review Frequency that is less than the Total Days to complete the task.

• I need a rule on the Reminder Frequency so that user can't select a reminder that is greater than the Review Frequency.

So:

Total Days = 14

Review Frequency = Bi-Weekly

Reminder Frequency = Weekly

Validation = True

Total Days = 14

Review Frequency = Weekly

Reminder Frequency = Daily

Validation = False

Total Days = 14

Review Frequency = Bi-Weekly

Reminder Frequency =  Monthly

Validation = False

I've tried a few things, but nothing seems to work, such as a calculated field that returns a true/false value. I think the solution is a combination of things I've tried. What happens is I end up thinking too much and my brain turns to mush and I make this harder than it has to be.

Any advice or suggestions are welcome.