How to Select Documents using formula language

I am trying to select documents in a category based on information received from an @prompt.

I start by getting a list of the categories and assign it to survey titles.

Code:

surveytitles:=@DbColumn(“”:“nocache”;“”;“ExcelExport”;1);

Then I do an @prompt to see which category the user wants

Code:

@Prompt([OkCancelList];“Pick a survey”; “Please choose a survey”;“”;surveytitles)

Now I want to select all the documents in the category…

Im at a loss here. Help appreciated.

Subject: How to Select Documents using formula language

This is typed from memory so the syntax maybe wrong

cat := @Prompt([OkCancelList];“Pick a survey”; “Please choose a survey”;“”;surveytitles);

doc := @DbLookup( “”:“[NoCache]”;“”;“(Viewname)”;cat; “DociD”);

@PostedCommand( [OpenDocument] ; 1 ; doc)

Where (Viewname) is a flat view sorted by the category.

DocID has the document ID.

Subject: How to Select Documents using formula language

And what do you want to do with the documents? Depending on what you want to do with them might change how to get them.

In any case, when looking for documents and handling them, I tend to use LotusScript, it allows more flexibility…

Subject: RE: How to Select Documents using formula language

I want to have the documents selected for exporting just a certain category of documents. The documents will not be opened.

Subject: There isn’t an @command to select specific documents.

You would need to build something using Lotusscript.

Subject: RE: How to Select Documents using formula language

I recently posted code that includes an agent to export the selected category. Read Exporting from Notes documents to spreadsheets (without an export view)