I use @DBColumn to do a lookup for a Dialog List field. One document a view that has one field with all the words needed. (I do this so the user can edit the list) In R5 it works great. I open the database in the 6.5 client and I get an error. here is the fomula:
t1 :=@DbColumn(“”;“”:“”;“Lookup View 3”;1);
@If( @IsError( t1 ) ; “Lookup Error” ; t1)
Any ideas? I need to keep this working for both R5 and R6.5
Open for alternatives if there is any.
Thank you
PJG
Subject: @DBColumn Works in R5 not in R6.5 Why?
I did take out the @If stmt and it worked from there. I might still try the @Text stmt just to see what the error was. Thank you for the help. I will add them to my tech tips DB.
Subject: RE: @DBColumn Works in R5 not in R6.5 Why?
It doesn’t make sense that removing the @If would make it work. That is not what made it work. Please don’t put a tip in your tip database that says, to make lookups work, don’t test the result with @IsError. You must test the result to make your application work reliably.
Please put the @If back. If it goes back to not working when you do this, then I want a closer look at the application.
Subject: @DBColumn Works in R5 not in R6.5 Why?
I did take out the @If stmt and it worked from there. I might still try the @Text stmt just to see what the error was. Thank you for the help. I will add them to my tech tips DB.
Subject: @DBColumn Works in R5 not in R6.5 Why?
Since I lost 4 hours with this kind of preblem, I stopped writing dbcolumn ou dblookup like that. I always write :server:=@Subset(@DbName;1) ;
db:=@Subset(@DbName;-1) ;
etc … and
result:=@DbColumn(“Notes”:NoCache";server:base;view,column)
If necessary I test result with @IsError
It works from Domino 4.1 to 6.52. It’s long but it’s safe and easy to read later.
More code to write but less time to debug.
Subject: RE: @DBColumn Works in R5 not in R6.5 Why?
I’m sorry – what exactly is the problem? Are you saying you don’t think “” in the second argument works to access the current database? If so, you’re mistaken. The way you’re doing it is more trouble to program and less efficient.
Perhaps what you discovered is that doesn’t work – that I could believe.
Subject: RE: @DBColumn Works in R5 not in R6.5 Why?
Take it easy Andre,like you I know “” in the second argument works to access the current database and doesn’t work .
Since I’m coding dbcolumn and dblookup the way you don’t like, I never spend my time to debug this king of formula. It’s probably less efficient, but whats’s 0,1 sec in domino application ? And it’s more clear to read.
So I agree with you for debug :
@If( @IsError( t1 ) ; @Text(t1) ; t1) to read error message.
Subject: RE: @DBColumn Works in R5 not in R6.5 Why?
I can understand your not wanting to spend time debugging your formula when you have a way that works for you.
However, I think it’s a bad idea to present this to others as a solution when you don’t really understand what the original problem was. I know that “” works just fine to access the current database, is faster and less typing.
Therefore, the change to use @DbName was not the change that solved your problem. Because you didn’t discover the real cause of your problem, you are likely to have the same problem again in a formula where you do use @DbName. Also, your solution is likely not to work for others, so you’re wasting their time by suggesting they change a part of their formula which isn’t wrong.
Subject: @DBColumn Works in R5 not in R6.5 Why?
Patrick,I tested your code on 6.0.3 and it works as intended?
Field subject is dialogue list with Allow multiple values checked.
Field test used your formula (modified to look at another view) and it returned the values listed in the subject field.
Perhaps I didn’t set up the environment correctly?
Subject: RE: @DBColumn Works in R5 not in R6.5 Why?
@DbColumn has not changed – it is certainly not broken in 6.5. Something about your application is different.
Change the second line of your formula to:
@If( @IsError( t1 ) ; @Text(t1) ; t1)
so that you can see what the actual error message is.
Incidentally, to lookup in the current database, you can use “” as the second argument – not “”:“”.