AnsweredAssumed Answered

How to retrieve SRF form field in Run_JavaScript_1 operator

Question asked by thangnguyen4460426 on Sep 11, 2013
Latest reply on Sep 17, 2013 by Tom_Kouhsari
Hi all,

I am fairly new to PAM 4.1 and I've been stuck on this issue for some time. What I am trying to do is simply retrieve a form field from an SRF and assign it to a Process Variable....

1.) I have created an SRF with an id=Form and within "Form" there is a text field with id=Form.user

2.) After I start the SRF and enter in a user into the text field and submit it, the SRF kicks off its linked process.

3.) The process consists of the Start, Stop Failure, Stop Success, and Run_JavaScript_1 operator.

4.) The Run_JavaScript_1 operator only contains the following in Run JavaScript:
// loads all form fields to process variables
var user = ca_fdGetTextFieldValue('Form', 'Form.user');
Process.requestingUser = user;
but the process fails with the following reason:

Failed to execute code:
// loads all form fields to process variables
var user = ca_fdGetTextFieldValue('Form', 'Form.user');
Process.requestingUser = user;

-- ReferenceError: "ca_fdGetTextFieldValue" is not defined. (#6)

Can anyone offer any insite with regards to this problem?

Thanks,
Thang

Outcomes