$$Return field not returning what told

here is my code. i have told the form to do this: if form is new and sent: show thank you note

if form is read and saved: show in read mode. i have tried the code sent to me earlier and modified it but now, when i sent or saved i get a page cannot be displayed. i can’t figure out why? do you see something wrong with my code that i cannot see? here it is:

dbl := @DbLookup(“”;“”;“KeywordLookup”;“ContentHomeURL”;4);

TempURL:=@If(@IsError(dbl);“”;dbl);

HomeURL:=@If(TempURL!=“”;TempURL;“javascript:history.go(-2)”);

contentURL:=@ReplaceSubstring(HomeURL;“~”;“/”+@ReplaceSubstring(@Subset(@DbName;-1);“\”;“/”));

REM {Warning: Lots of raw HTML in here…};

UNID:=@Text(@DocumentUniqueID );

yy :=@Text(@Year(date));

mm := @Text(@Month(Date));

@If(@Length(mm)=1;@Set(“mm”;“0”+mm);“”);

@If(chkDelete=“Delete”;

“[/”+@ReplaceSubstring(@Subset(@DbName; -1);" “;”+“)+”/WebDelete?OpenAgent&“+UNID+”]";

“”);

REM {Display after sent};

Thanks := “

Your form has been submitted!


”;

DominoHomePage := "<a href="javascript:self.close()" target=_self>Close ";

Msg := Thanks + DominoHomePage ;

REM {Display after saved};

tmpUNID:=@Text(thisUNID);

tmpDBURL:=DBUrl;

tmp:=“[” + tmpDBURL + “/0/” + tmpUNID + “?OpenDocument]”;

@If(@IsNewDoc;Msg;tmp)

Subject: $$Return field not returning what told

Dear Monica,

First of all make one form called “$$ReturnGeneralError” so that whatever error is it will display on that form. Then we can figure out. Bcoz its very difficult for us .

RIshi

Subject: RE: $$Return field not returning what told

Dear Rishi,
thanks for your reply. I am very new at notes and have done only very little
coding on it so bare with me.

ok, i created a Field called $$returngeneralerror since the form is already a
test one. what i received when sent was this:
HTTP Web Server: Lotus Notes Exception - Entry not found in index

General Error. This can be caused by many different things, i.e. the
page/document you were trying to access doesn’t exist or no longer exists. If
you are unsure why you got this error, return to the homepage of this website
and click on Contact Us at the top of the page, in the email describe what you
were doing (trying to do) before this error page popped appeared.
thank you.

/operations/bsreq.nsf/doc-MetaData4BSR-new?OpenForm

WHEN I SAVE THIS DOC I GET THIS ERROR INSTEAD:
HTTP Web Server: Lotus Notes Exception - Field is too large (32K) or View’s
column & selection formulas are too large

General Error. This can be caused by many different things, i.e. the
page/document you were trying to access doesn’t exist or no longer exists. If
you are unsure why you got this error, return to the homepage of this website
and click on Contact Us at the top of the page, in the email describe what you
were doing (trying to do) before this error page popped appeared.
thank you.

/operations/bsreq.nsf/Lookup/WEBA6A73UF?editDocument

AT LEAST I AM GETTING AN ERROR. BEFORE I WAS GETTING PAGE CANNOT BE DISPLAYED.
CAN’T TELL WHAT IS WRONG WITH MY CODE. HERE IS MY CODE AGAIN:
$$RETURN:
Msg := Thanks + DominoHomePage ;

REM {Display after saved};
tmpUNID:=@Text(thisUNID);
tmpDBURL:=DBUrl;
tmp:=“[” + tmpDBURL + “/0/” + tmpUNID + “?OpenDocument]”;

@If(@IsNewDoc;Msg;tmp);

REM {if form receives error};
@If(@IsError($$Return);“b>The form received an
error]”;$$ReturnGeneralError)

AND THE $$RETURNGENERALERROR:
REM {Return error if found in $$Return};
@If(@IsError($$Return);“b>The form received an error]”;$$Return)

I MAY HAVE EVERYTHING WRONG SO FORGIVE ME FOR SUCH SLOPPY POSTS.

MONICA