Question

how to translate this code?

Select * from view.view where ageYear = "combobox.value"

I know the code in sql but i cant do it in lotus script,

Was it helpful?

Solution

@DBlookup is your friend. I haven't written Formula in a long, long time--all my major code for Domino is in Java now, but something like

 @dblookup("Notes": "NoCache"; "" : "ViewName"; "combobox.value"; columnnumber)

You cannot look up multiple columns with one @dblookup the way you can select them in SQL. You will need multiple @dblookups.

Also, this assumes you have a view sorted by the indexed value, in your case ageYear.

If you really need multiple columns, perhaps you should be using LotusScript or Java, or reanalyzing what you are trying to do. Context would help.

OTHER TIPS

Lotus Notes is not a relational database. It is a programmable user interface and document-oriented storage system all integrated into one package. You need to learn the elements of Notes programming. You can't just think of a SQL query and "translate" it.

In the context of your previous question, you can use a form and an embedded view to do what you want. You don't need LotusScript. Ken's answer to that question has already pointed you in the right direction. My answer provides another perspective.

But there are many other ways to do what you want; and there are many other circumstances in which you might want to select documents from a view.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top