Why do values keep changing with [RETURNDOCUMENTUNIQUEID] option in @DbLookup

I wanted to experiment with the [RETURNDOCUMENTUNIQUEID] option of @Dblookup.

I created a computed field with the following formula:

@DbLookup(“”:“NoCache”;“”:“”;“vwAllAgenciesByVenNum”; vendor_no;1;[ReturnDocumentUniqueID]:[FailSilent] )

If the view contains more then one document with the first column equal to vendor_no then more then one value is returned. That was expected.

But the problem is that the values keep changing when there are multiple values. There are four vlaues in the multiple value fied to correspond to the four documents. The first value always has the same docid but the remaining values keep changing. Sometimes they appear to be valid unids but most times they either are all zeros or just don’t look like a valid unid.

Has anyone else seen this or willing to give it a try?

Subject: Why do values keep changing with [RETURNDOCUMENTUNIQUEID] option in @DbLookup

I gave it a try with your code and I am only getting back one value - it appears to be working as expected but I am running 7.0.1.

I did not get any unids with all 0’s nor was it changing on me.

Subject: RE: Why do values keep changing with [RETURNDOCUMENTUNIQUEID] option in @DbLookup

Thanks for trying.

Did you have multiple documents that satisfy the one key? Works fine for me if there is only one doc matching the key. The problem occurs when there is more than one doc matching the key.

Subject: RE: Why do values keep changing with [RETURNDOCUMENTUNIQUEID] option in @DbLookup

Yes, tried it again with multiple values and it returned all the unids matching my vendor number. When I entered multiple vendor#s, I also got back multiple proper unids.

I wonder if there is a bug in 6.5.2?

Subject: RE: Why do values keep changing with [RETURNDOCUMENTUNIQUEID] option in @DbLookup

I don’t know if it’s related but it seems to be problematic

Domino 6.x server crashes multiple times a day

Solution This issue has been reported to Quality Engineering as SPR# DJOE69PDXC.

It was found that if the @DBLookup function contains the parameter [RETURNDOCUMENTUNIQUEID] and the lookup should return the “UNID” of a document that has a save/replication conflict, the @DBlookup will crash multiple Domino servers.

To work around the issue, do not use [RETURNDOCUMENTUNIQUEID] with @DBLookup.

JYR