Notes Attachment

Hi All,Is it possible to restrict an user so that he can attach only one file in a particular rich text field? The code generated from the help file after using “attachment count” as the search key word works only for saved documents not for ui document.

Can any one help me?

Subject: Notes Attachment

Well if you save button then put this validation code

@If(@Attachments>1;@Do(@Prompt([Ok];“Attachments”;“Please attach only one document”);@Return(“”));“”);

@Command([FileSave])

this will see u thru

Subject: RE: Notes Attachment

Hi,

It worked in the button but I worte the following code in the QuerySave :

@If(@Attachments>1;@Do(

@Prompt([Ok];“Attachments”;“Please attach only one document”);@SetField(“SaveOptions”; 0));“”)

Ths worked , but it actually closed the document without saving. Is there any process to keep the document open?

Subject: RE: Notes Attachment

Thank you Abhishek it worked.