Notes Ninjas Notes Ninjas
Lotus Notes hints, tips, error messages
WebQueryOpen computed fields

Hint Short Cut: Add this to your code & documentation to help you find this page.
http://www.notesninjas.com/#WQOComputedField or http://www.notesninjas.com/A555F9/nn.nsf/ByAlias/WQOComputedField


Setting a field in the WebQueryOpen event agent works well for editable fields, but for computed fields it gives annoying results...





For prepopulating editable fields you can so this by setting a field in the WQOform agent.

NB Tip calling agents WQOformname or WQSformname makes it clear where the agent is used !

Get the documentcontext like normal:

Dim s As New notessession
Dim db As notesdatabase
Set db = s.currentdatabase
Dim doc As notesdocument
Set doc = s.documentcontext

and then set the field

doc.name="whatever"

this will then come up as editable value in the field name in the web form.

Note the document does NOT need to be saved.

 

For a computed field you need:

doc.cname="computed value"

doc.cnameWQO="computed value"

then on the actual form

the computed field "cname" is set as computed with the value: cnameWQO

and another editable field cnameWQO which is hidden on the form when reading

and also has the HTML other set as type='hidden' with no value set .

Notes: the document does NOT need to be saved in the WQO agent.

If the web form is not saved then no document is created.

 

 

 Jump to:     Notes Tips
    Lotus Notes Index 
  Register for Tips
Previous Lotus Notes Tip 
    Next Lotus Notes Tip
Your company logo here?
Adam Foster
Free Cash Making Web Site
Free Revenue Earning Blog Site
 Free Revenue Earning Newsletter Site   
Free Search Pages Free Web stats
Free Contact Us page
Cheap .com domain names
 Need a website or 
   Lotus Notes
  problem solved?
Adam Foster
Web Services Platform Architecture: Soap, WSDL, WS-Policy, WS-Addressing, WS-Bpel, WS-Reliable Messaging and More by Francisco Curbera, Frank Leymann, Tony Storey, Donald Ferguson, Sanjiva Weerawarana
Other books claim to present the complete Web services platform architecture, but this is the first one I've seen that really does. The authors have been intimately involved in the creation of the architecture. Who better to write this book?
See at: Amazon.co.uk | Amazon.com |