WebQueryOpen Question

When a document is opened on the web, I’ve found that a computed field (‘MessageField’) displays a message even though the field has the following formula:

@If(@IsDocBeingSaved; MessageField;“”)

MessageField uses Pass through HTML and was assigned the following value in the WebQuerySave when the document was originally saved:

“alert(‘This is a test’);”

Since the document is not being saved when it is opened, it seems that MessageField should be null. However, ‘This is a test’ is displayed and it’s not apparent why. WebQueryOpen runs no agent and should not be a factor.

I’d appreciate any ideas on why MessageField displays “This is a test” when the document is opened on the web.

Thanks.

Subject: WebQueryOpen Question

Actually, that formula doesn’t do a whole lot in a computed field, since they aren’t computed in read mode. What that means, in terms of this method of carrying messages, is that you don’t want to leave a message in the field when the edit session is over. Even if the field is computed for display, the field value won’t be removed until the document is edited again.

So when $$Return can fire, let it do the messaging for you if any messaging is required. Once the document has been saved/finalised, you can direct the user back to it by URL:

message := @If(something=“something”; “

first message

”; something=“

something else

”; “second message”; “”);

appURL := @GetHTTPHeader(“Host”) + “/” + @WebDbName;

docURL := appURL + “/” + @Subset(@ViewTitle;1) + “/” + @Text(@DocumentniqueID);

“

Thank You

” + message + “

<a href="” + docURL + “">Read your submission

<a href="” + appURL + “">Return to the application

”