AnsweredAssumed Answered

Character limit

Question asked by Matty_1 on Apr 11, 2013
Latest reply on Apr 11, 2013 by philmodjunk

Title

Character limit

Post

      I'm trying to implement a character limit that will not let the user conintue typing once the limit is reached.  What I have so far is the following but it's not working the way I'd like.  First off I'm unsure how to count spaces as well.  Second, I can hit the limit, the rror message pops up, the limit is in theory correct (minus the lack of space count) but if you continue typing it removes the last character typed and replces it with the latest one you've typed instead of completely ignoring the last thing typed.

      

     Set Variable [$Count; Value: Length ( Purchases::Comments )]

     If [$CCount  320]

     Show Custom Dialog [custome dialog here]

     Set Variable [$CommentFilter; Value:Left ( Purchases::Comments; 319)]

     Set Field [Purchases::Comments; $CommentFilter]

     End If

Outcomes