Hi there!
I have this formula which works as computed text, but not as a computed field. The column it is looking through has both positive and negative values.
@If(@IsError(@DbLookup(“”:“NoCache”;@DbName;“ReceiveInventoryView”;@Text(@DocumentUniqueID);8));“0”;@Text(@Sum(@ToNumber(@DbLookup(“”:“NoCache”;@DbName;“ReceiveInventoryView”;@Text(@DocumentUniqueID);8)))))
Any ideas why?
Gérald
Subject: Formula evaluates correctly as computed text, but not in a computed field. Why?
Have you tried it as a Computed for Display Field?
Also, why use @DBName instead of “” since it is working on the same database?
I am not sure why it works as text and not a field without having the database in front of me. I do not mind looking at it if you would like. You can email it to lotushelp2003NOSPAM@yahoo.com, without the no spam of course…
Subject: Formula evaluates correctly as computed text, but not in a computed field. Why?
First, I would recommend doing the lookup once:
tmpLookup:=@DbLookup(“”:“NoCache”;@DbName;
"ReceiveInventoryView";@Text
(@DocumentUniqueID);8);
@If(
@IsError(tmpLookup);
"0";
@Text(@Sum(@ToNumber(tmpLookup)))
)
Second, are you working in a strictly ND6 environment? @ToNumber will not work in R5.
Finally, what exactly is being returned by the lookup? How and when is the field failing? In read mode? edit mode? is it dependent on some other value which has not yet been calculated?
What is the field type? are you allowing for multiple values in the field? (That is another reason I am suggesting the tmpLookup).
Subject: RE: Formula evaluates correctly as computed text, but not in a computed field. Why?
Thanks for your response.
You’re right about the lookup, it should only happen once.
I am working in version 6.02CF1 and my app is web based. It is a computed text field which does not allow multiple values. The field is not dependent on other fields and my form is set to automatically enable edit mode.
Sorry if my post was too vague 
Gérald
Subject: What kind of error are you getting?
Subject: Formula evaluates correctly as computed text, but not in a computed field. Why?
The following formula resolves as expected when is Computed Text, but incorrectly in a Field (Computed or computed for Display)
!@IsNotMember(“security_DesignDevelopment_5”:“security_DesignDevelopment_4”:“security_DesignDevelopment_3”:“security_DesignDevelopment_2”:“security_HomeOwner_1”:“security_ProjectManager”;Roles)
Roles is not a field on the form, it is added via web query open agent through script library:
Set newitem = New NotesItem( genConn.docCurr, “Roles”, arrRoles )
Again, the formula and all agents perform as expected when in computed text. I am using server 6.5.3 on windows 2003 server.