- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2018 11:10 AM
Trying to create a catalog client script alert message that pulls information from populated fields as part of that alert message. Below are the field values in the record producer.
Below is the script. The Alert fires, but doesn't pull the values from the form.
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var myAcknowledgement = g_form.getValue('acknowledgement');
var values = g_form.getValue('course_department' + 'course_number' + 'course section' + 'semester_term');
if (myAcknowledgement == 'true')
alert(values);
}
Any help is appreciated.
Thanks.
Jason
Solved! Go to Solution.
- Labels:
-
Service Portal Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2018 11:25 AM
Hi,
your script is correct no issues in that, but g_form.getValue('course_department' + 'course_number' + 'course section' + 'semester_term');
can get values from one field at one time.
Instead create separate var and use those in alert.
for ex:
var depart = g_form.getValue ('course_department');
var num = g_form.getvalue ('course_number');
alert ("Course Department "+depart+" Course Number "+num);
PS: Hit like, Helpful or Correct depending on the impact of the response

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2018 11:25 AM
Hi,
your script is correct no issues in that, but g_form.getValue('course_department' + 'course_number' + 'course section' + 'semester_term');
can get values from one field at one time.
Instead create separate var and use those in alert.
for ex:
var depart = g_form.getValue ('course_department');
var num = g_form.getvalue ('course_number');
alert ("Course Department "+depart+" Course Number "+num);
PS: Hit like, Helpful or Correct depending on the impact of the response

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2018 11:30 AM
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var myAcknowledgement = g_form.getValue('acknowledgement');
var val1 = g_form.getValue('course_department');
var val2 = g_form.getValue('course_number);
var val3 = g_form.getValue('course_selection');
var val4 = g_form.getValue('semester_term');
if (myAcknowledgement == 'true')
{
alert(val1 + " " + val2 + " " + val3 + " " + val4);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2021 05:47 PM
Found your reply when I had a similar problem and above worked perfectly, thanks for sharing. Your effort from years ago is saving my bacon today 😃

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2018 11:32 AM
Use below script
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var myAcknowledgement = g_form.getValue('acknowledgement');
var values = g_form.getValue('course_department') +'-' +g_form.getValue('course_number')+ '-' +g_form.getValue('course section') +'-' + g_form.getValue('semester_term');
if (myAcknowledgement == 'true')
alert(values);
}
Please mark this response as correct or helpful if it assisted you with your question.