asked on August 19, 2021

Greetings,

Similar to my previous post: https://answers.laserfiche.com/questions/190937/Forms-Lookup-Rules-Crashing

I am running a lookup rule on a field on forms. The difference here being that the previous post had a lookup rule act on a email field, and this time I am running a rule on a date field.

The previous issue was that a blank email field would crash my connection because the stored procedure being used was not handling blank input. This has been fixed.

 

Now, the issue seems to be that my connection is crashing when either of 2 cases occur.

  • the length of the string typed into the date field is less than the date format being used but not blank
    • i.e. 0 < stringLength < 10 causes crash
  • string input is out of range for a day or month
    • inputting a day past 31 i.e. 2021-08-50
    • inputting a month past 12 i.e. 2021-15-19
  • ps.
    • the date format being used is yyyy-MM-dd
    • other cases such as blanks, stringLength > 10, different format being used etc. dont cause issues.

 

I assume the problem may lie with our stored procedure not accounting for these cases, just like the previous post.

How would one edit the SP to address the cases mentioned above?

  • if the input string does not match the date format, return a blank? abort the procedure?
  • if format is matched, parse the string into subsections (year, month, day)
    • ensure that month and day are in their respective ranges? (day 1-31, month 1-12)
      • if not in range, return blank/abort?

Any help is appreciated.

Thank you

 

 

0 0