Subject: Controlled Access Sections - Can it be done?
My application does something like this.Trouble is, I’m not quite sure how it works!
Basically, when a document is ‘opened for approval’ the following code runs:
FIELD OpenforApproval:=OpenforApproval;
@SetEnvironment(“OpenforApproval”;“Yes”);
@Command([EditDocument];“1”);
@Command([ViewRefreshFields]);
@Command([RefreshHideFormulas]);
@Command([RunAgent];“Refresh Document1”);
@If(MainProjectPhase=“Project Inception”;
@Do(
@Command( [SectionExpand] );
@Command([FileSave]));
@Command([FileSave]))
Only the section relevant to that approval is opened. As I haven’t specified (I dont think you are able to with this command) which section should open, I presume that it somehow works out which section is editable, and opens that, or possibly just opens the section that someone was editing last…not sure how - but it works for me!
Here’s the agent that are run above, not sure if they are relevant or not:
Sub Initialize
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = workspace.CurrentDocument
Dim doc As NotesDocument
Call uidoc.Refresh
'Call uidoc.Save
'Set doc=uidoc.Document
'Call doc.Save(True,True)
'uidoc.Reload
'uidoc.Refresh
'uidoc.Save
'Call doc.Save(True,True)
End Sub
btw I read the same help as you, and I’m not sure what “collapsible sections in a rich text item”
are either, or how you could create them (as rti would be a field surely - how could you put a section inside it)
Sorry if this isn’t brillant, but it’s the best I got…