PermaLink Punk'd by Compute with Form05/08/2006 04:37 PM
LotusScript
In spite of what's documented in the Domino Designer Help database, NotesDocument.ComputeWithForm evaluates all Computed When Composed formulae in a form, in addition to any Default Value, Input Translation, and Input Validation formulae present.

So how was I punk'd by this undocumented feature? When ComputeWithForm is invoked by a Notes 4.6 client, Computed When Composed formulae are not evaluated. Since the company I work for still has a handful of Notes 4.6 users, the documents they were creating programmatically did not have field values for any of the Computed When Composed fields when the code they invoked called ComputeWithForm. All I had to do to resolve the problem was update the code to manually set the field values, but still, whey does Notes 6.5 evaluate Computed When Composed formulae at all? Since it obviously does, why doesn't it evaluate Computed formulae as well?
Comments :v

1. Don McNally05/12/2006 02:26:26 PM
Homepage: http://dmcnally.blogspot.com


I'm having a love/hate relationship with ComputeWithForm right now too. I never used 4.6 so I can't verify what you say, but it definitely does Computed When Composed fields. I have not seen if it changes values back to the default if you have subsequently changed the value, but I always assumed it treated the field like an editable field and just set its default value.

It will also set a value for a Computed field if the field doesn't exist on the document, which is what is hanging me up: I have to remove the item to have ComputeWithForm set its value but sometimes it doesn't add the item back to the document.

I wish there was a simple way to compute all fields on a back-end document in LotusScript!




2. Don McNally06/20/2006 02:15:49 PM
Homepage: http://dmcnally.blogspot.com


After further study, I ended up changing some of my fields to Editable but Hidden. Then I put the formula that sets the field value in the Input Translation. After a couple of hiccups, that seems to have resolved it for me. But it is still a pain that ComputeWithForm doesn't do Computed fields.




Credits
NuTechs Powered by Domino
Search
Calendar
July 2009
Su
Mo
Tu
We
Th
Fr
Sa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Monthly Archive
Get Real, Detroit!
Real Detroit Weekly
SWARM
Service
With
A
Rapid
Motion


-- old Rally's Hamburgers credo
By Category
The BlogRoll
About
Contact Me
Contact me, Michael Sobczak, using this e-mail address:

my first initial my last name at Yahoo dot com
Recent Entries
No Recent Blogs
Powered by
Blogsphere