hcl-bot
January 30, 2007, 10:04am
1
In a field I have the formula below in a dialoglist but it is not working. “Incorrect datatype for database function”.It works when in an actionbutton.
Server := MyServer;
DB := MyDB;
@If (!@IsNewDoc & @IsDocBeingLoaded ; @Unavailable ; @Unique (@DbColumn
(“”:“NoCache”; MyServer:DB; “MyView”; “”)))
hcl-bot
January 30, 2007, 10:08am
2
Subject: @DBColumn not working
I don’t think the problem is with your @DBColumn , but instead with your use of @Unavailable , which the Notes help states:
This function works in agent, view action, and toolbar button formulas.
Instead of using @Unavailable , use “” instead, if you want there to be no selectable values.
hth.
brandt
hcl-bot
January 30, 2007, 10:25am
3
Subject: @DBColumn not working
Try the below formula:
tmpOptions := @if ( !@isDocBeingEdited ; @Unavailable ; @DbColumn (“”:“NoCache”; MyServer:MyDB; “MyView”; “1”));
@if (@isError (tmpOptions); “”; @Unique (tmpOptions))
HTH
Adi
Subject: RE: @DBColumn not working
Sorry I still get error message if I replace @Unavailable with “” - or if I use: @if (@isError (tmpOptions); “”; @Unique (tmpOptions)) I get an empty list which indicates error.
Subject: RE: @DBColumn not working
This works!
Server := “”;
DB := “MyDB”;
@If (!@IsNewDoc & @IsDocBeingLoaded ; @Unavailable ; @Unique (@DbColumn
(“”:“NoCache”; Server: DB; “All”; 1)))