Question
Pegasystems Inc.
GB
Last activity: 27 Feb 2017 6:11 EST
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***