Controlled Access Sections - Can it be done?

I want to Collapse or Expand a controlled access section on a form when the form loads depending on the value of certain fields in the document that the form is loading.

I have looked through the forum and the help but all I can find is documentation referring to the IsExpanded property of the NotesRichTextSection.

The help talks about “collapsible sections in a rich text item”

I don’t think this is applicable, but hten I’m not sure what a section within an rti is? -

If someone could point me in the right direction I would be very grateful.

Thanks

Pete

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…

Subject: RE: Controlled Access Sections - Can it be done?

Many thanks for that. Trouble is I have several sections on the form and need to specify which ones to expand/collapse and when.

Pleased it wasnt just me confused by the help!