Limitingurl link in a field to one

Hello,

I want to restrict users to be able to enter only something like “www.cnn.com” in a field and not “www.cnn.com” and " www.lotus.com"

Thanks

Subject: Limitingurl link in a field to one.

You already posted the same question here: http://www-10.lotus.com/ldd/nd6forum.nsf/0/8e6631f4a63a157d85257b910079dcc1

You did not respond to the follow-up question.

  1. What kind of field? Text, multi-value text or rich text?

  2. How do you define a URL? What will be the criteria?

  3. What have you tried? Post your code.

Also, your first post had a better explanation. You need to explain better what you are trying to do. From what I understand (based on this post as well as your previous one), you want to prevent users to enter more than one URL in a field.

Without you answering the questions above, it is impossible to give you an answer.

If it is a rich text field, you can parse the content and count the number of URLs when exiting the field, for example.

Use the NotesRichTextItem class and NotesRichTextItemNavigator class.

Subject: Limiting url link in a field to one.

Thank you and I apologize for any confusion. It is a text field.And yes I want to prevent users to enter more than one URL in a field.

Thanks a lot for yourr time.

Subject: RE: Limiting url link in a field to one.

Use Instr() in the Exiting event to display a warning, for example.

You are still not answeing all the questions. How will you (e.g. the code) know it is a URL?

Only the ones that contains www. ? Then you will miss mobile.cnn.com and blog.texasswede.com for example.

Only the ones that start with http:// ? Then you miss all without the protocol, and all ftp://ftp.example.com URLs…

Before you start coding, you need to analyze the problem.