Persistate API documentation
SelectToAdd Method (execution, selected)
NamespacesPersistateStandardOperationsSelectToAdd(Execution, List<(Of <<'(Persistent>)>>)%)

[This is preliminary documentation and is subject to change.]

Asks the user to select one or more objects to add to an associated collection.
Declaration Syntax
C#
public static ExecutionResult SelectToAdd(
	Execution execution,
	out List<Persistent> selected
)
Parameters
execution (Execution)
The Execution object created by the Add request.
selected (List<(Of <(<'Persistent>)>)>%)
Set to a List of the selected objects, or null if an error occurred, or the user cancelled.
Return Value
If objects were selected, then CommitResult. If the user cancelled, then NoActionResult. If an error occurred, then an ExecutionResult with NoAction, and a message containing the reason for the error.
Remarks

This is a helper method used by the ExecuteAdd method. You can use it if you want non standard behaviour in your controller Add methods. How this works depends on whether the collection has a defined from or within clause, and for a from clause, the type of the the from clause source collection (several or many).

If the target collection has a from clause with a several source collection, then UserInterface.ChooseSeveral is used to allow the user to select objects from the collection. If it has a from clause with a many source collection, then the appropriate lookup form is displayed modally, in which the user can select object(s) from this collection (or even create one).

If the target collection has a within clause, or no clause at all, then UserInterface.SelectObjects is called to allow the user to browse the persistent tree and select one or more objects. The within clause source object is used as the root for this selection, or if there is no within clause, the local Domain is used as the root.

Assembly: Persistate (Module: Persistate) Version: 0.6.1.20 (0.6.1.20)