Text - The easiest way to copy text to the clipboard
If you want app users to be able to copy the contents of an app to the clipboard, the new Copy function makes this task super simple!
How to copy label text to the clipboard
A typical scenario is to copy label text to the clipboard. For example, we may want to allow users to copy a code or a long reference number.
The illustrate how this would look, let's take the label on a form control. To enable users to copy the 'address1' value by clicking on the lable, we would set the OnSelect property of the label to the following:
Copying a single column of data from a gallery to the clipboard
Another use case scenario is to copy multiple values to the clipboard, say from a gallery.
Let's take the example of the gallery shown beneath. To copy the contents of all the "address1" values that have been loaded into the gallery, we can add button and apply the following formula:
Copy(This formula will copy all "address 1" values, with each item separated with a line break (Char(10)).
Address1 & Char(10)
Copying multiple columns of data from a gallery to the clipboard
As an extension of the above, here's an adaptation to copy multiple fields from each row a gallery to the clipboard. In this example, we'll copy the fields "address1", "City", and "Postcode".
Address1 & Char(9) & City & Char(9) & Postcode & Char(10)
- Numbers - How to Format Numbers with a Dollar Symbol the Right Way
- Text - How to extract email addresses that are formatted with angle brackets
- Text - How to split input strings by carriage return followed by the colon character
- Text - How to convert a character to its ASCII numeric value
- Why doesn't the BeginWith, EndsWith, and Contains operators work as expected?