<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Preventing the user from copying and pasting from one text field to another.</title><link>https://community.appian.com/discussions/f/user-interface/12654/preventing-the-user-from-copying-and-pasting-from-one-text-field-to-another</link><description>Hi All. 
 How can we prevent a user from copying data from a text field and pasting it to diffrent field? 
 Thanks.</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Preventing the user from copying and pasting from one text field to another.</title><link>https://community.appian.com/thread/69043?ContentTypeID=1</link><pubDate>Wed, 28 Aug 2019 13:52:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7f0e310d-184b-46dd-b1e3-8c8ca024cd57</guid><dc:creator>Bibhuti Mohapatra</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You can perform restriction for paste with the help of below implementation.&lt;/p&gt;
&lt;p&gt;Solution is&lt;/p&gt;
&lt;p&gt;- Take a text field.&lt;/p&gt;
&lt;p&gt;-Keep number of chars user can enter.&lt;/p&gt;
&lt;p&gt;-refresh onkeypress&lt;/p&gt;
&lt;p&gt;-check the length of the entered data into text field.&lt;/p&gt;
&lt;p&gt;-if the length is more then the limit then that must be entered using paste.&lt;/p&gt;
&lt;p&gt;-highlight using validation.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;load(&lt;br /&gt; local!maxCharInput: 2,&lt;br /&gt; local!value,&lt;br /&gt; local!oldValue,&lt;br /&gt; &lt;br /&gt; {&lt;/p&gt;
&lt;p&gt;a!textField(&lt;br /&gt; label: &amp;quot;E-Mail &amp;quot;,&lt;br /&gt; value: local!oldValue,&lt;br /&gt; refreshAfter: &amp;quot;KEYPRESS&amp;quot;,&lt;br /&gt; saveInto: {&lt;br /&gt; local!value,&lt;br /&gt; if(&lt;br /&gt; len(&lt;br /&gt; local!value&lt;br /&gt; ) - len(&lt;br /&gt; local!oldValue&lt;br /&gt; ) &amp;gt; local!maxCharInput,&lt;br /&gt; {},&lt;br /&gt; a!save(&lt;br /&gt; local!oldValue,&lt;br /&gt; local!value&lt;br /&gt; )&lt;br /&gt; )&lt;br /&gt; },&lt;br /&gt; validations: {&lt;br /&gt; if(&lt;br /&gt; len(&lt;br /&gt; local!value&lt;br /&gt; ) - len(&lt;br /&gt; local!oldValue&lt;br /&gt; ) &amp;gt; local!maxCharInput,&lt;br /&gt; &amp;quot;Copy Restricted!!!&amp;quot;,&lt;br /&gt; {}&lt;br /&gt; )&lt;br /&gt; }&lt;br /&gt; )&lt;br /&gt; }&lt;br /&gt;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Preventing the user from copying and pasting from one text field to another.</title><link>https://community.appian.com/thread/56551?ContentTypeID=1</link><pubDate>Wed, 13 Jun 2018 07:50:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:78bafb6a-45a4-4f79-8538-ded8df330c29</guid><dc:creator>arikd398</dc:creator><description>Hi Singh002 (abhisheks997) ,&lt;br /&gt;
&lt;br /&gt;
As everyone suggested masking can be one of the solution to achieve this use case so you can just add masked : true.&lt;br /&gt;
&lt;br /&gt;
a!textField(&lt;br /&gt;
                      label: &amp;quot;Password&amp;quot;,&lt;br /&gt;
                      labelPosition: &amp;quot;JUSTIFIED&amp;quot;,&lt;br /&gt;
                      value: ri!user.password,&lt;br /&gt;
                      saveInto: ri!user.password,&lt;br /&gt;
                      readonly: false,&lt;br /&gt;
                      disabled: false,&lt;br /&gt;
                      masked: true,&lt;br /&gt;
                      validations: {}&lt;br /&gt;
                    )&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Preventing the user from copying and pasting from one text field to another.</title><link>https://community.appian.com/thread/56549?ContentTypeID=1</link><pubDate>Wed, 13 Jun 2018 06:45:53 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:aac9159f-91df-4c3b-9774-9f9ff3e786e0</guid><dc:creator>Sidhant Behura</dc:creator><description>Disabling copy paste is something which is done on the HTML/Javascript level and currently Appian doesnt allow us to write customized html page. So currently there is no way to achieve this requirement of yours. You can use mask option if that suffices your requirement.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Preventing the user from copying and pasting from one text field to another.</title><link>https://community.appian.com/thread/56548?ContentTypeID=1</link><pubDate>Wed, 13 Jun 2018 06:41:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b951dd24-1e93-41a4-b92c-4e46afdd49bc</guid><dc:creator>Singh002</dc:creator><description>I too think masking is the only option .&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Preventing the user from copying and pasting from one text field to another.</title><link>https://community.appian.com/thread/56545?ContentTypeID=1</link><pubDate>Wed, 13 Jun 2018 06:08:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:95b1b4d7-36a0-478d-bf4e-91ac1d1b206c</guid><dc:creator>gurdeeps</dc:creator><description>Hi, Appian does not provide this feature but masking can be a solution to this.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Preventing the user from copying and pasting from one text field to another.</title><link>https://community.appian.com/thread/56534?ContentTypeID=1</link><pubDate>Tue, 12 Jun 2018 21:15:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a0e7ab0b-8602-4f7e-9003-4baca605f4ad</guid><dc:creator>Eliot Gerson</dc:creator><description>Just for your own edification, it&amp;#39;s not necessary to write a custom rule for this. Appian actually has this functionality out of the box! The &amp;quot;masked&amp;quot; option for text fields will determine whether the text is masked on input.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Preventing the user from copying and pasting from one text field to another.</title><link>https://community.appian.com/thread/56533?ContentTypeID=1</link><pubDate>Tue, 12 Jun 2018 21:08:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e23b6dbd-b40d-445e-ad1a-29486edc2c6b</guid><dc:creator>malcolmp</dc:creator><description>Hello Singh002,&lt;br /&gt;
&lt;br /&gt;
While I&amp;#39;m not aware of a way to disable an operating system&amp;#39;s built in copy and paste capability, there are other strategies you can employ to keep data from being copied and pasted.  Once a field is filled out, you can change the display value to asterisks so that the information can&amp;#39;t be copied and pasted.  See below code for example.&lt;br /&gt;
&lt;br /&gt;
I hope this helps.&lt;br /&gt;
&lt;br /&gt;
Malcolm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
load(&lt;br /&gt;
	local!customer1Address,&lt;br /&gt;
	local!customer2Address,&lt;br /&gt;
	a!formLayout(&lt;br /&gt;
		firstColumnContents: {&lt;br /&gt;
			a!textField(&lt;br /&gt;
				label: &amp;quot;Customer 1 Address&amp;quot;,&lt;br /&gt;
				value: if(&lt;br /&gt;
					rule!APN_isEmpty(local!customer1Address),&lt;br /&gt;
					&amp;quot;&amp;quot;,&lt;br /&gt;
					joinarray(repeat(len(local!customer1Address), &amp;quot;*&amp;quot;), &amp;quot;&amp;quot;)&lt;br /&gt;
				),&lt;br /&gt;
				saveInto: {&lt;br /&gt;
					local!customer1Address&lt;br /&gt;
				}&lt;br /&gt;
			),&lt;br /&gt;
			a!textField(&lt;br /&gt;
				label: &amp;quot;Customer 2 Address&amp;quot;,&lt;br /&gt;
				value: if(&lt;br /&gt;
					rule!APN_isEmpty(local!customer2Address),&lt;br /&gt;
					&amp;quot;&amp;quot;,&lt;br /&gt;
					joinarray(repeat(len(local!customer2Address), &amp;quot;*&amp;quot;), &amp;quot;&amp;quot;)&lt;br /&gt;
				),&lt;br /&gt;
				saveInto: {&lt;br /&gt;
					local!customer2Address&lt;br /&gt;
				}&lt;br /&gt;
			)&lt;br /&gt;
		}&lt;br /&gt;
	)&lt;br /&gt;
	)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Preventing the user from copying and pasting from one text field to another.</title><link>https://community.appian.com/thread/56529?ContentTypeID=1</link><pubDate>Tue, 12 Jun 2018 17:36:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e81292d9-937a-4644-b704-08b9119538d3</guid><dc:creator>Robert Shankin</dc:creator><description>Hi -&lt;br /&gt;
A user can never paste into a field that is disabled or read only.&lt;br /&gt;
Other than that, there isn&amp;#39;t a way to restrict paste into a text field that is enabled and writeable right now. &lt;br /&gt;
&lt;br /&gt;
What&amp;#39;s your use case?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Preventing the user from copying and pasting from one text field to another.</title><link>https://community.appian.com/thread/56528?ContentTypeID=1</link><pubDate>Tue, 12 Jun 2018 17:33:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:bf8b9847-e499-44aa-a7ff-70271613aec3</guid><dc:creator>Eliot Gerson</dc:creator><description>It would probably be helpful if you could elaborate on your use case. But one option might be to make the first text field masked.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Preventing the user from copying and pasting from one text field to another.</title><link>https://community.appian.com/thread/56527?ContentTypeID=1</link><pubDate>Tue, 12 Jun 2018 17:33:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f6f837cc-3f70-4b99-b75d-7b45da403410</guid><dc:creator>Dan Lluhi</dc:creator><description>Unfortunately, you won&amp;#39;t be able to prevent a user from using copy and paste functionality. However, you can ensure that two fields do not contain the same value by using a validation (e.g. if(ri!field1 = ri !field2, &amp;quot;Error message&amp;quot;, &amp;quot;&amp;quot;). If you&amp;#39;re dealing with a grid and you want to ensure that an entire column has unique values, you can use the fn!contains() function to see if the entered value already exists in another row. Hope this helps!&lt;br /&gt;
&lt;br /&gt;
Dan&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>