@dblookup help

I have the following code in two different forms, which basically populates the fields with the date of a meeting.

temp:=@If(conname=“”|primary=“”;“”;@DbLookup(“notes”:“nocache”;“”:“”;“latest_date_lu”;@text(conname+“,”+primary);2;[PartialMatch]));

@If(@IsError(temp)|temp=“”|conname=“”|primary=“”;primnewdate;@Subset(temp;1))

However, in one form, it works perfectly, yet when copied to the other form, it fails. The error message I get is “Error: Keywords must be text”. However, the keywords are already text and are wrapped by an @text.

I have been trying to solve this one for a couple of days now and am at my wits end!

Anyone know how to solve this problem? Thanks in advance.

Subject: @dblookup help

Are you sure the error on the 2nd form is coming from the @DbLookup? Or is it coming from the field being populated? It looks like it might be a keyword field that’s objecting to being given a date value.

Try changing the main expression to:

@If(@IsError(temp)|temp=“”|conname=“”|primary=“”;@Text(primnewdate);@Text(@Subset(temp;1)))

Subject: RE: @dblookup help

Gwen,

I think its the lookup, because when I change the dblookup formula to look in column 1 of the view, as opposed to column 2, it returns the correct record/value.

Subject: RE: @dblookup help

But if the values in column 1 are text, and the values in column 2 are dates, a keyword field (or any formula expecting a text value) would work with a value returned from column 1, but reject a value from column 2.

Subject: @dblookup help

Try the [FailSilent] flag in your @DBLookup function

and are you sure that there are no multiple values in the view colum nr2? otherwise you could try :

@Implode(@DbLookup(“notes”:“nocache”;“”:“”;“latest_date_lu”;@text(conname+“,”+primary);2;[PartialMatch]))