@DBLookup aborts fetching data after a Null value

Hi there,

as I found out the function @DBLookup has a strange, yet dangerous behaviour.

If you fetch a view with @DBLookup by getting data by field names instead of column numbers, then @DBLookup stops fetching data at the first document which contains a Null value (empty) at the field chosen. This can be quite confusing, if you calculate sums based on those lookups and accidentially one of the documents has an empty field.

I have not found any workaround yet, @Trim etc. won’t help because @DBLookup itself simply quits collecting data.

I there any way to fix this ?

Subject: @DBLookup aborts fetching data after a Null value

Write an @If statement to see if your @DbLookup throws an error. Something like @If(@IsError(@DBLookup);;“”)

I use this technique all the time in keyword formula lookups where I am not certain i will get any values. It should work in your scenario as well.

brandt