Question

How to refer clipboard properties in text file type with .js extension

How to refer clipboard properties in text file type with .js extension.

Based on a property value of cipboard, we supposed to execute block of statements from a text file with .js extension. How can e refer clipboard value in text file rule type.

Comments

Keep up to date on this post and subscribe to comments

Pega
September 25, 2019 - 6:43pm

There are a number of ways to do this.  Two of them include:

1) Use an ajax call to ask the server for the value of some property.  This would be appropriate if the property is not likely to have the value when your page is first loaded, so you need to ask later.

2) During the staging of the script, do something like this:

var valOfGreeting = "<pega:getValue param=.Greeting/>";

The idea is that you use a pega tag which gets evaluated as the script is being staged so that by the time your script is staged, the above line is seen by the browser as something like

var valOfGreeting = "hi there";