Idea

10
Views
Close popover
Vamsi Raj (Vamsi_Raj)
Aaseya IT Services Pvt Ltd
Senior Consultant
Aaseya IT Services Pvt Ltd
SA
Vamsi_Raj Member since 2017 5 posts
Aaseya IT Services Pvt Ltd
Posted: 1 week 5 days ago
Last activity: 1 week 5 days ago

Copy Property Value onClick of a Button

Reqiurement: Onclick of a Button, have to copy the text inside the Textarea.

Solution:

1. Include the below JS in UserWorkForm.

function copyValue(copyfrom) {

    var text = copyfrom;

    navigator.clipboard.writeText(text);

    console.log('Text copied to clipboard');

  }

2.  when using on click of a button, use action Run Script and pass the property value of the TextArea or TextInput(eg: .pyNote) to be copied as a parameter to copyfrom. 

3. Check on the UI by Clicking the Button.

Whatever the value in .pyNote will be copied to System Clipboard. You can check by using Paste or Ctrl+V.

Pega Knowledge 8.5 User Experience Senior System Architect