I have been trying to work out why and @DbLookup was failing in a view (which just lists two fields from a subset of documents) and have found that switching off the option “show response documents in a heirachy” in the view solves the problem. Does anyone know why this is?
I didn’t create the view, so am not sure why this option was set. As far as I can tell, the documents displayed in the view dont have response documents (I have not come accross response documents yet so am not really familiar with them). Is there anything unusual that might ‘break’ if I switch this option off?
Gail
Subject: @DbLookup fails when “show response documents in a heirachy” is set
Do you mean you’re using @DBLookup in a COlumn formula of a view? If so that won’t work. See the Designer Help on @DbLoookup, it cannot be used in a view.
ST
Subject: @DbLookup fails when “show response documents in a heirachy” is set
If you check “show response documents in a heirachy”, response-documents will not show up in the view if the parent document is not in the view.
So, if you check this option (which is default), make sure parent documents are included in your view selection.
In your case, your view is probably empty if you check “show response documents in a heirachy”…
To check if anything will break, create a design synopsis and check where the view is used.
Subject: RE: @DbLookup fails when “show response documents in a heirachy” is set
Hi and thanks for your responses.
I’m not using @DBLookup in a Column formula of a view, and my searched view is not empty (all the documents that should be in it are, and these are both parent and response documents), so neither of these suggestions seem to be the cause of the problem.
I’ve now also noticed that @dblookup only fails when looking for a response document. These are listed in the same column as the parent documents (the first sorted column etc) so I am still not sure why @DbLookup is failing.
Subject: RE: @DbLookup fails when “show response documents in a heirachy” is set
When response documents are displayed in a hierarchy, they are normally displayed in a special “responses only” column. That is, they are taken out of the normal column display. What you see spanning the row is the result of a single, narrow (usually 1 character) column in the view design, and that column is often both the first column in the view and unsorted.
Turning of the option will force the documents to display in the same way that main documents do. That is, all of the values show up in the intended columns. As well, responses will not show up grouped under their parents; their order of appearance will be determined by the column sorting in the view.