Thursday, August 28, 2008

Redirect in WebQueryOpen

It looks like very simple task - redirect to another element in WebQueryOpen , but when I tried to do it it did not work ! I mean in WQO JavaScript does not work well (or probably at all).
So I found good solution for me, and I would like to share it:

We have to take current document and then change the value in $$HTMLHeader.

4 comments :

Ed Lee said...

Hi I use a redirect in a LotusScript WQO agent by filling out the $$HTMLHead like below.

Hope this helps.

Ed Lee

PS. I head to take the angle brackets out so I could post this

Call contextDoc.ReplaceItemValue("$$HTMLHead", |meta http-equiv=refresh content=0;url=../frm.DocumentLocked?OpenForm&LockedBy=|+commonUsername+|| )

Anonymous said...

hi. i use this:
0. url like this: server/base.nsf/redirectform?openform&docunid=blablabla
1. open a form (name: redirectform)
2. in this form to fields:
a. Query_String_Decoded
b. DocUnid with formula (@Middle(Query_String_Decoded;"DocUnid=";"&"))
and in HTML Head Content: "dbpath:=@ReplaceSubstring(@Subset(@DbName; -1); "\\"; "/");
"<_Meta Http-equiv=\"Refresh\" Content=\"0; Url="+dbpath+"/0/" + DocUnid + "?OpenDocument\">""

Yuriy Pastovenskyy said...

Hi
u can use next trick: move form content to subform, then place on form computed subform which relies on some field which can be changed in WQO agent.

Actually, I didn't check this, but seems like it should work

cheezwhizze said...

subform solution does not appear to work. I think computed subform is computed before WQO runs.