Question

1
Replies
1892
Views
Close popover
John Pritchard-Williams (JOHNPW_GCS)
PEGA
Client Support Team Lead
Pegasystems Inc.
GB
JOHNPW_GCS Member since 2009 20 posts
PEGA
Posted: February 10, 2017
Last activity: February 27, 2017
Closed
Solved

Javascript Function: Best way of setting PRPC Property to return value ?

I'm using a Javascript library which has functions which returns values (usually Strings); like this (toy) example:

function MyFunction() {
		return "This was set from JS.";
}

I need to set a PRPC Property to the return value of the function; what's the best way of doing this ?

Is there something more elegant than the following for instance:

1. Create PRPC Property 'RetValue'.

2. Place this on a Section ; but hide it from users.

3. Run the JS in the same Section.

4. Within the JS; locate the PRPC Property's HTML using Javascript (getElementByID ? but what *is* the ID ?); and update the HTML with the value.

5. Then the PRPC Section will hold the updated value ; but the Clipboard will NOT; but (will it?) when we move to the next screen in the flow - will the value be automatically added to the Clipboard ?

Is there an actually PRPC Javascript library for doing this sort of thing already ?

Thanks in advance,

John

***Updated by moderator: Lochan to add Categories***

Data Integration Java and Activities User Experience
Moderation Team has archived post,
Close popover This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.