Masking in Notes

Posted on 1999-12-15
Medium Priority
Last Modified: 2013-12-18
How to do Masking in a date field in Notes? I want to have a field(text type) so that date format can be accepted in DD/MM/YYYY format. But I want to protect the 3rd and 6th Positions of the field so that the user cannot enter anything in this position(I want to put a slash seperator later). How do I do this? i do'nt want to create seperate fields for DD,MM,YY.  
Question by:vsprakash
  • 3
  • 2

Expert Comment

ID: 2286871
Input Translation at the field level will do the trick -- the rigorous approach, independent of regional/date settings (to enforce DD/MM/YYYY specifically, in a text field, with the slashes explicitly):

@Text(@Day(@TextToTime(Fieldname)))+ "/" + @Text(@Month(@TextToTime(FieldName))) + "/" + @Text(@Year(@TextToTime(Fieldname)))

Of course, controlling the field is much easier if it is of datatype date, or you accept some of the format-strings in @Text().  And you will probably want to add Input Validation for error trapping.

Author Comment

ID: 2289712
I do'nt want to do concat on this field. Iam just trying to findout if there is an easy way out to Mask

Expert Comment

ID: 2290283
It isn't a cat operation at all.  Input translation entirely resets the value of the field as it is exited or refreshed.  

Notes is not Access.  There are ways to accomplish essentially the same thing as masking, via input translation and input validation field events as I have described above,
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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


Accepted Solution

jschwarz earned 100 total points
ID: 2292364
I think this question deserves a few more points.  But I'll answer anyway.

You can do a pattern match with:
  @Matches(DateField ;"??/??/????")

That will return true or false regarding the length of DateField and regarding the 3th & 6th characters.

Then, test the rest of the characters for numbers with this:
  @IsNumber(@Left(DateField; 2))
  @IsNumber(@Right(DateField; 4))

Finally, you can test for values in the normal way (i.e., @If(@Left(DateField; 2) < 13 & > 0)

Expert Comment

ID: 2294897
That's a fair enough approach for input validation... nothing like masking, though.  At any rate, it's unlikely to satisfy the question's author, who seems to be looking for some magic bullet without a clear understanding of Notes' events.

Expert Comment

ID: 2295761
sk5t, could you clarify?  Maybe a better understanding of what masking is would help me.  I thought what I supplied was pretty much what he was requesting.

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
This video tutorial shows you the steps to go through to set up what I believe to be the best email app on the android platform to read Exchange mail.  Get the app on your phone: The first step is to make sure you have the Samsung Email app on your …
When you have multiple client accounts to manage, it often feels like there aren’t enough hours in the day. With too many applications to juggle, you can’t focus on your clients, much less your growing to-do list. But that doesn’t have to be the cas…

587 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