Problem solve Get help with specific problems with your technologies, process and projects.

'Field not found in index' error when testing a form

When I test a form, an error appears saying: field not found in index. I also encounter an error: this function is inappropriate for file system directories. What should I do?
I believe the error you're getting is actually "Entry not found in index." This happens because a field on the form has macro code that uses @DbLookup. The call to @DbLookup returns an error because the key is not found in the view. Most likely the reason the key is not found in the view is because you are reading the key from a field on the form -- and the field does not yet contain a value. Since the value "" does not appear in the view, you get an error.

When you use @DbLookup, you should always test the returned value to see whether it is an error. For example, instead of:

@DbLookup(""; ""; "someView";
 keyField; 2) 

you might write:

@IfError(@DbLookup(""; ""; "someView";
 keyField; 2); "") 

For greater efficiency, you might test the key field first and not bother to do the lookup if it's blank.

@If(someField = ""; ""; 
@IfError(@DbLookup(""; ""; "someView"; keyField; 
2); "")) 

Do you have comments on this Ask the Expert question and response? Let us know.

Dig Deeper on Lotus Notes Domino Formula Language

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...