Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

String Validation Code

Posted on 2003-11-14
2
Medium Priority
?
201 Views
Last Modified: 2013-12-18
I'm too lazy to figure out the syntax in notes to do this
I need to validate a field in a form before the its saved.

Heres the Validation Criteria

XXXXX-000-XX-X-XX

X=Alpha Numeric
0=Number

The user has to enter the dashes as well....

Heres the code I have....

Sub Click(Source As Button)
      Dim workspace As New NotesUIWorkspace
      Dim uidoc As NotesUIDocument
      Set uidoc = workspace.CurrentDocument
      If uidoc.FieldGetText("fldSKU")="" Then
            Messagebox "Please Enter a SKU Number"
      Elseif
=================CODE GOES HERE=============================
      Else
            uidoc.Save
            uidoc.close
      End If
End Sub
0
Comment
Question by:marefin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
ksi2001 earned 200 total points
ID: 9749094
>I'm too lazy to figure out the syntax in notes to do this

and you think 25 points is enough to get me out of laizyness?

use InputValidation event for the field and formula language

FIELD fldSKU:=fldSKU;
@If(@Matches(
@UpperCase(fldSKU);
"{A-Z}{A-Z}{A-Z}{A-Z}{A-Z}-{0-9}{0-9}{0-9}{0-9}-{A-Z}{A-Z}-{A-Z}-{A-Z}{A-Z}");
@Success;@Failure("Please input fldSKU in the form of XXXXX-000-XX-X-XX"))


0
 

Author Comment

by:marefin
ID: 9749144
ok 50 points for not being as lazy as me
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question