Error in lookup

I am getting an error in a field that I'm sure has worked OK in the past. Please can you help spot the problem?

In a certain form I have a computed text field with the formula @If(Consequence_People="Cat 8";@DbLookup("";"";"Default settings";"Safety risk matrix";"Cat8_Inj_Onsite"); and several more similar conditions. It also has a field "Consequence_People" which is a radio button field with values "Cat 8" and other key values.

In the view "Default settings", I have a number of forms, one of which is "Safety risk matrix". In this view there is only one form of this name, and it contains a text field "Cat8_Inj_Onsite" (and others for the other conditions) into which I've entered words. I expect to see these words in the computed field when selecting

Selecting any of the radio button conditions brings up "ERROR: Entry not found in index or view's index not built" in the computed field.

I have made a full index of the database and if I click "View Search" I see "Indexed" on the top line for all views, so I think it's indexed, unless there's more than one index type.

There are several similar lookup systems in the form, and they all bring up this error.
StuartOrdAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CRAKCommented:
If you have ruled out any type conflicts (number vs. text in the key field), and you are sure that this document exists, the two most common remaining causes would be (1) the view is not sorted (or the 1st sorted column is a different field) and (2) either the key in the @DbLookup or the keyword in the configuration document contains a character that is not supposed to be there (often a space or enter). Less likely: the document is protected by a readers field.
You might also want to make sure that there isn't a 2nd view with the name "Default settings": your formula might be looking in the wrong view.
0
CRAKCommented:
Forgot to mention: Notes is nagging about a view index, not the FT index. The view index is built when the view is accessed. View indexes are updated by F9. Other options (controlled from withing the client) are SHIFT + F9 (rebuild current view) or CTRL + SHIFT + F9 (rebuild the ones that are not built yet, update all other views in the database).
0
larsberntropCommented:
@DBLookup,  given a key value, looks in the specified view (or folder) and finds all documents containing the key value in the first sorted column within the view.

So, is the form name you specify ("Safety risk matrix") in the first sorted column in the view, when you look at the view using Designer preview or th Notes client?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

larsberntropCommented:
Also check the name of the view
0
doninjaCommented:
Make sure you don't have a replication conflict on that document type that is returning incorrect/incomplete data.
0
StuartOrdAuthor Commented:
Thanks all - I've found the error. As usual I'd changed something at some time and failed to see the repercussions until later when I'd forgotten what I'd done previously. The first column in the Default settings view is a field in the form that in this case contains "1. Safety risk matrix", so changing the formula to @If(Consequence_People="Cat 8";@DbLookup("";"";"Default settings";"1. Safety risk matrix";"Cat8_Inj_Onsite"); it works OK. So both CRAK and larsberntrop hit the nail on the head, I'd forgotten about the first column relevence and thought it was looking for the form name.
Many thanks.
Stuart
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.