Changes
== Copy & paste ==
On way to replicate data is through the copy & paste mechanism. A typical use case is as the following.
* or another copy is triggered, which overrides the old copy;
* or the copied branch is no longer available (E.g. deleted)}}
=== Regarding paste ===
{{Attention|It is possible that some children (directly/indirectly) under the branch root are not copied even though they are locally available. For example, if a branch root workpackage is configured in a way that clients are not allowed to create tasks underneath. The client cannot violate that rule and, therefore, will ignore these tasks during replication. A quick way to check whether that's the case on the client is to browse to e.g. that workpackage and see if it's possible to create a task.}}
{{UnderConstructionStart}} == Data templates{{Version/WinXSince|34.29}}{{Version/XamarinSince|4.09}} ==
On top of the standard copy & paste mechanism, {{UBIK}} also supports a certain type of objects, namely data templates to help organize and present what the users can replicate under different hierarchical contexts.
=== Replicating data templates ===
Essentially, replicating using data templates is nothing more than regular copying & pasting objects instances. They will carry the same information (property values, display strings, etc.) as the original data templates. However, according to whether the replicated instances appear in the selection list afterwards, the replication can be divided into two types.
A typical user scenario of this is administrators/work planners creating work package data templates from similar templates that already exist.
== XAML Commands ==
* Uid: Mandatory, specifies the Uid of the [[SYSCLS_OFFLINE_TEMPLATE_QUERY|offline data template query]];
* FilterContext: Optional, specifies the Uid of the context object from which the filter criteria values should be extracted and used. If unspecified, the current parent/context object where the command is triggered is used;
* EnableFilloutCriteria: Optional, whether the filter criteria of the offline data template query should be automatically filled out using the FilterContext. False if unspecified;* SkipDialog: Optional* (see attention below), whether the app should skip showing the compact dialog and jump right to the full query page for displaying results. False if unspecified. {{Attention|Since UBIK.Xamarin presents most results in pages instead of dialogs due to device dimensions, SkipDialog should always be set to True there.}}
<tabs>
<Button.CommandParameter>
<controls:KeyValueList>
<controls:KeyValueParameter Key="Uid" Value="{Binding DataContext.OfflineTemplateQueries[0].UID, ElementName=SomeRandomButton}UID_OF_YOUR_CHOSEN_QUERY" /> <controls:KeyValueParameter Key="FilterContext" Value="01475137-5028-400B-8E03-AB66C2444D30UID_OF_YOUR_CHOSEN_CONTEXT_OBJECT" />
<controls:KeyValueParameter Key="EnableFillOutCriteria" Value="true" />
</controls:KeyValueList>
</Button.CommandParameter>
<Button.CommandParameter>
<classes:KeyValueList>
<classes:KeyValueParameter Key="Uid" Value="{Binding BindingContext.OfflineTemplateQueries[0].UID, Source={x:Reference SomeRandomButton}}UID_OF_YOUR_CHOSEN_QUERY" /> <classes:KeyValueParameter Key="FilterContext" Value="01475137-5028-400B-8E03-AB66C2444D30UID_OF_YOUR_CHOSEN_CONTEXT_OBJECT" />
<classes:KeyValueParameter Key="EnableFillOutCriteria" Value="true" />
</classes:KeyValueList>
</Button.CommandParameter>
* ReplicateAsTemplateCommand
Both replicate the current context object/branch and require no additional parameters. Their differences are explained [[#Replicating_data_templates|above]].
{{UnderConstructionEnd}}
== See also ==