• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 905
  • Last Modified:

Field computed by WebQueryOpen cannot be used for Computed Subform???

As it seems, a computed subform is loaded BEFORE the WebQueryOpen is run. Depending on a field computed in the WQO, I want to load a certain subform.

Impossible??
0
Sjef Bosman
Asked:
Sjef Bosman
  • 3
  • 2
  • 2
  • +1
3 Solutions
 
HappyFunBallCommented:
Based on your first sentence, it seems impossible.  Any chance you can use the Query String to trigger which subform appears?  

Another idea:  What about opening an agent that does the computation, figures out which subform should be opened, then redirects the user to the correct page and passes the appropriate QueryString, which then launches the correct subform.

Wow, talk about your mousetraps!
0
 
CRAKCommented:
I should give it a try Sjef but, quite similar to HappyFunBall, I had already started thinking of a backdoor approach and have JS to read the computed field and perform a location.replace.
Or move the computation up to the moment where you process the href or the onClick event, using e.g. a JS function. If a more complicated computation is required (e.g. with lookups) you'd get something like ehhhh..... the QueryString approach again!! It works for sure!


0
 
Sjef BosmanGroupware ConsultantAuthor Commented:
I tried it, oh yes, and hit a solid brick wall. On a Chech website, in Google's cache, I found a document describing this issue, and that it was reported to some instance at Lotus. Must be release 9 they get this one solved...

The subform contains only one RichText field, that is also computed by the WQO (works). The placement on the form of the subform can differ, depending on a fieldvalue also computed in the WQO. For the time being, I replaced the computed subform by Computed Text, with the value
    @if(field="1"; @Text(RichTextField); "")
This works, because I know the RichText-field only contains text, in fact HTML text.

But what will happen if the text grows over one of the magic boundaries, e.g. 64K?? Will @Text still work then?? I think not, that's why I need a good solution.

I like the redirect-idea, but it would mean that the page would be loaded twice. And, AFAIK, in some browsers you can disable redirects.
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
HappyFunBallCommented:
If I remember correctly, I think you can get around the redirection issue by using a

Print "[[http://www.yahoo.com]]" instead of using the single-bracket method.  According to the URL below, "if u put [[local url]], domino will do an internal redirect to the url (no round tript to server via 302 http code like simple []"

http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/171b8b98638e129e85256dac00305a94?OpenDocument&Highlight=0,%24%24return,%5B%5B
0
 
Sjef BosmanGroupware ConsultantAuthor Commented:
Hmm... Another good idea, which makes the use of JavaScript impossible. And isn't it so that it only works from an Agent this way? Or from the $$Return? @URLOpen... Could I be placing that somewhere strategic, to stop opening the current document and trigger reopening it with an additional parameter?? Just thinking out loud...

Will @URLOpen immediately stop loading and replace the document currently being opened by a new one?? I wonder...
0
 
p_parthaCommented:
does this help:


in the HTML Head of hte form :

"<script language=\"javascript\">" + @NewLine +
subformname + @NewLine +
"</script>"

and in the WQO:

doc.subformname = location.replace('http://yourcompleteurl?opendocument&subformname=<firstorseconddependingonifcondition>

0
 
CRAKCommented:
No need to load an entire page!
Since you already aim to alter the original URL to add a parameter for the subform, you might as well alter it in such way that you open a different form (?ReadForm) or a page (can't use Query_String_Decoded), leaving the document untouched in the background....
0
 
Sjef BosmanGroupware ConsultantAuthor Commented:
I'll be picking up this one some day. Awarding points in the meantime...

Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now