Few days I am trying to create a correct selection formula for my view.
I have the client-side environment variable used in this formula and the list of documents ids, by which I must to made my selection. And only documents with this id must to be in the view.
My formula looks like this:
envValue := @Environment("organizationConfigIDKey");
validationDocIds := @DbLookup("":"NoCache";"":"";"search_validation_config_by_cre_id"; envValue; 2);
result := { & @Text(@DocumentUniqueID) = };
@For(i := 1; i <= @Elements(validationDocIds); i := i + 1;
result := @If(i > 1; result + " | " ; result + "") + " @Text(" + validationDocIds[i] + ")" + @Char(13)
);
SELECT Form="OrganizationStructure" & result
Is it possible to select documents by ID's from by set from @DbLookup? Can you please give some small advice to make similar way solution e.t.c.
Thank you.
It is NOT possible to manipulate a view dynamically like you need it.
There is a way to manipulate the view selection formula with lotusscript, but then the executer of this action needs designer rights and it has bad side effects when more than one user does the same at one time.
Usually such tasks are done with either:
a) A "Shared, Private on First use" Folder, that is dynamically filled (on open or periodically) with the desired documents
or
b) A Form that has a view embedded, using "Single Category" to show only related mails: The view is categorized by organizationConfigIDKey, and the formula for the single category selects the corresponding key...