Question
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689967000/60be5301-7c10-45b4-9f85-3eb227bfa95c.jpg?itok=pyfj5IYL)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689967000/60be5301-7c10-45b4-9f85-3eb227bfa95c.jpg?itok=pyfj5IYL)
Standard Chartered
MY
Last activity: 30 Jul 2018 1:24 EDT
Access clipboard values in a Javascript
We have a requirement to set a clipboard property value(operator locale ) to variable in JavaScript. How can we access the property in a JS file . ?we tried JSP/pega reference etc without any luck.
I see there are couple of inbuilt functions like the getOperatorID() function which returns the current operator .Where is this function getOperatorID() defined ? . We need write a similar function to get the operator locale . Any leads ?
***Edited by Moderator Marissa to update platform capability tags***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Updated: 19 Jul 2018 11:11 EDT
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-05/4d0638c3-fd5e-4736-90ed-cab0c56a000f.jpg?h=2c3406ce&itok=j_U_5PFz)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-05/4d0638c3-fd5e-4736-90ed-cab0c56a000f.jpg?h=2c3406ce&itok=j_U_5PFz)
Capgemini Sverige
SE
Hi Faijas,
you can take the reference of the code written in HasRequiredSkills function.
Maybe it will help you.
-
SRI RAMA KRISHNA CHAITANYA VEDALA Josh Baldwin
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689967000/60be5301-7c10-45b4-9f85-3eb227bfa95c.jpg?itok=pyfj5IYL)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689967000/60be5301-7c10-45b4-9f85-3eb227bfa95c.jpg?itok=pyfj5IYL)
Standard Chartered
MY
Hi Prashanth,
Thank you for reply .
But i dont find this function . We are on Pega 7.2.2 . I can find only hasDesiredSkills which is usual java
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689954000/5e1df259-88ec-40db-aa4a-a5b27280a5f7.jpg?itok=ChGegHBG)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689954000/5e1df259-88ec-40db-aa4a-a5b27280a5f7.jpg?itok=ChGegHBG)
Pegasystems Inc.
US
Please check below link:
https://collaborate.pega.com/question/access-clipboard-javascript
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689967000/60be5301-7c10-45b4-9f85-3eb227bfa95c.jpg?itok=pyfj5IYL)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689967000/60be5301-7c10-45b4-9f85-3eb227bfa95c.jpg?itok=pyfj5IYL)
Standard Chartered
MY
Hi Susan,
I did go through this post before . But this isn't working anymore
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689952000/7a75a418-2e77-45cc-b70f-b26e612fc61c.jpg?itok=dc30rC_9)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689952000/7a75a418-2e77-45cc-b70f-b26e612fc61c.jpg?itok=dc30rC_9)
Merkle
GB
Do you want a JSP code to access & set clipboard property?
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689952000/7a75a418-2e77-45cc-b70f-b26e612fc61c.jpg?itok=dc30rC_9)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689952000/7a75a418-2e77-45cc-b70f-b26e612fc61c.jpg?itok=dc30rC_9)
Merkle
GB
Hi,
Could you please check below Java code? That should work for you.
ClipboardPage pg = tools.findPage("testPage");
pg.getProperty(".objName").setValue(“setvalue”);
Regards,
Gopesh
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689967000/60be5301-7c10-45b4-9f85-3eb227bfa95c.jpg?itok=pyfj5IYL)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689967000/60be5301-7c10-45b4-9f85-3eb227bfa95c.jpg?itok=pyfj5IYL)
Standard Chartered
MY
Hi Gopesh,
We did try these . but it wont work
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689952000/7a75a418-2e77-45cc-b70f-b26e612fc61c.jpg?itok=dc30rC_9)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689952000/7a75a418-2e77-45cc-b70f-b26e612fc61c.jpg?itok=dc30rC_9)
Merkle
GB
Hi,
Have you got the resolution of your issue? Could you please share the screen shot of your code?
Regards,
Gopesh
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
CollabPartnerz
IN
Hi
Set the value to a hidden text control in your section and include var a = $('.keyclipb div div span').text(); in the script.
The keyclipb is the read/write class that we give in the advanced presentation option of the control.
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689954000/f7151e69-7bd9-4702-be03-ebb6f0beb05f.jpg?itok=GWX3Wdig)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689954000/f7151e69-7bd9-4702-be03-ebb6f0beb05f.jpg?itok=GWX3Wdig)
CollabPartnerz
IN
Please find the below link
https://collaborate.pega.com/question/access-clipboard-javascript
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689954000/ea0db37c-0cf3-4f6a-90e5-7fa31ed4f3cf.jpg?itok=pvfvIWNy)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689954000/ea0db37c-0cf3-4f6a-90e5-7fa31ed4f3cf.jpg?itok=pvfvIWNy)
Vodafone
IN
Hello Neel,
Please find the below sample code which may help you to capture the clipboard property values and reuse it when you need.
var testvar = '<%= tools.findPage("pxRequestor").getIfPresent(".pxReqLocale").getStringValue() %>';