Dynamic View..notesview class..with prompt

Hi,It’s my first attempt (and possibly last, due to change of role!) of using notesview class.

I was hoping I could let the user select the Status of the documents they want in the view.

So, I created a prompt and a notesview.selection formula, with much code borrowed from the help. (Code is at the end of this post!).

I have two problems:

  1. How can I use “” in the selection formula, e.g. the formula actually should be SELECT form = “Issue” but I cannot use "'s 'coz it thinks it’s the end of the formula or something (code won’t compile)

  2. How can I use the ‘response’ value as part of the selection formula, e.g. if I just put this in, it assumes I want that status to equal the word response, not the response the user has entered:

Sub Click(Source As Button)

Dim ws As New NotesUIWorkspace

Dim uiview As NotesUIView

Dim view As NotesView



Dim response As Variant

Dim values As Variant

Values=Evaluate(|@DbLookup("Notes":"NoCache" ; ""; "Keywords"; "Status"; 2)|)

response = ws.Prompt (PROMPT_OKCANCELLIST, _

"Select a Status", _

"Please select the status's you would like in the view.", _

values(0), values)



Dim formula As String

formula = "SELECT form = Issue"

Set uiview = ws.CurrentView

Set view = uiview.View

view.SelectionFormula = formula

End Sub

Also, once you change the selection formula, do you have to refresh the view?

Subject: Dynamic View…notesview class…with prompt…

Hi

Use a different delimiter, I use {}, but you can also use the pipe |

formula = {SELECT form = “} + response + {”}

or something similar

Dan