Sounds like a caching issue. @DbLookup has a "NoCache" option that you can use to tell it to check the view and make sure it has the latest information. Otherwise, it remembers the value it found for each lookup, and if you do the identical lookup later, it'll return the value it looked up before. Refreshing the view index does no good because @DbLookup isn't even looking at the view. Exiting the database frees the @DbLookup cache, which is why it works after you exit and return.
Dig Deeper on Lotus Notes Domino Formula Language
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.