Copy & Paste

Appfarm Create comes with rich possibilities for copy and paste at various levels. This article summarizes these features, including limitations.

Duplicate, Copy and Paste

Right-clicking a component, such as the UI Component Container, gives you two options: Duplicate or Copy to Clipboard.

Duplicate copies and paste the component directly (at the same location). This is handy for speeding up development by copying and making adjustments, or simply for making backups of a group of UI Components (duplicating the top-level container and hiding it by marking it visible = false)

Copy, or Copy to Clipboard, Copies the selected component to the clipboard, to paste it somewhere else.

Having a component on the clipboard, you may right-click and Paste the component. You are only allowed to paste it at a suitable place - e.g. you may not paste a Container inside an Action.

You may copy many settings of UI Components or Action nodes as well. For example, you may copy a text or a function from the UI Component Text, and paste it on any other setting that has the same type of input data type. In the example below, the Text setting expects a string input. The same goes for the Tooltip setting.

Things you may copy (and paste)

This is a non-exhaustive list of components and settings you may copy in Appfarm Create:

  • App

  • Service

  • View/Dialog/Drawer

  • Service Endpoints

  • UI Components

  • Data Source, App Variable, Runtime Property (in Apps and Services)

  • Action (in Apps and Services)

  • Most settings, including conditions and functions, both on UI Components or Action Nodes

  • Theme

  • Object Class and Enum

You may copy between solutions as well. Please see the section on Restrictions and limitations below.

Here are a few examples of some of the hidden gems. The first example is exceptionally useful: Having a large Condition (or Function), you may copy it to another UI Component, or the If Action Node. You may also copy and paste the condition, and then use a value processor to invert the whole expression.

Copy between solutions

You may copy a whole (single) App to the clipboard in Solution 1, and paste it into Solution 2. Everything is copied, except Permissions and Resource Files. Permissions need to be manually set up in Solution 2, and resource files must be uploaded manually to Solution 2 (download from 1, batch-upload to 2)

When an App is copied from one solution to another, the Theme and Object Classes (and Enums) used by that App are copied as well. You may not merge these copied Object Classes with existing object classes:

  • In case you have a Company object already in solution B, and the copied app generated a Customer object class and you would like them merged: You must use Find References on the Customer object class, and change all references to use the Company object class instead.

  • If you want to copy 2 Apps from solution A to B (or 1 App and 1 Service), you may currently not bundle them together in a single copy operation (2 copy operations will create duplicate object classes)

If you need to copy more than 1 App, Appfarm has the power to copy a whole solution. In this case, you must contact Appfarm. Appfarm will create a snapshot of Solution A, and send it to Solution B. You will then be able to apply that snapshot to Solution B from the Deploy menu. Note that applying this snapshot to Solution B will overwrite everything in Solution B.

Restrictions and limitations

There are certain limitations when copying something from inside one App to another App or Service (in the same solution, or in another solution).

  • Copy/Paste inside the same App or Service: Everything is copied.

  • Copy from inside one App or Service to inside another App or Service (in the same solution, or another solution): All data bindings are removed, including functions with function parameters. All bindings to data sources are removed when you try to paste it into another App. For example: A group of UI Components, with a table listing all Projects: When copying this from App 1 to App 2, the data binding of that table is removed. The table is preserved, but you must connect it to a data source in App 2. The reason is that the Apps do not share the data sources.

Last updated