GetDocumentByKey does not give any document at all

Hello everyone,

i do not know if i am applying in the right place but let’s give it a try :slight_smile:

I have similar situation like this one mentioned here. However I don’t get any document at all.

While running the code it tries to connect to outer lotus notes db and get a document according to a certain tabel number. However the function getdocumentbykey does not return any document at all. The funniest thing is that when I cut and paste the document in an outer database, the function starts working again - pulls out the right document.

Any ideas,???

Subject: GetDocumentByKey does not give any document at all

Hello,

We need to use the exact match parameter for the getdocumentbykey function in the lotus script.

For example

Set doc = view.GetDocumentByKey( “dummyvalue”, False )

The false value would help you to find the partial match in the database.

I hope the above information would be of any help to you.

Thanks

Rachit Mago

Subject: GetDocumentByKey does not give any document at all

This may sound simple, but is your view sorted?

Subject: RE: GetDocumentByKey does not give any document at all

After long analysis I found out a wrong view architecture. First of all is that first column (according to which) the code is finding documents is using weird code:@Trim(FullName:TabelCode:LNName:RevName:@Text(@DocumentUniqueID))

I understand that it provides document data of several fields in the first column but this is not the best way of providing key data. Actually it was the main problem, because this first column did not have all fields so some documents weren’t found.

Then I knew that I need to rebuild view information but I did not that I would come up with a solution like that. I have changed the selection criteria temporarily and imported all data, then put all things how it was before the change. Funny thing that it helped a view was rebuilt but I am not satisfied with this workaround because I don’t like to mess around with good working code. Have any other ideas?