hcl-bot
February 10, 2009, 11:47am
1
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.
hcl-bot
February 10, 2009, 12:27pm
2
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.
hcl-bot
February 10, 2009, 1:02pm
3
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…
hcl-bot
February 10, 2009, 1:07pm
4
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.
hcl-bot
February 10, 2009, 2:20pm
5
Subject: There isn’t an @command to select specific documents.
You would need to build something using Lotusscript.
hcl-bot
February 10, 2009, 6:15pm
6
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)