compare two variables on on a catalog item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2016 12:11 PM
I'm trying to compare two variables on on a catalog item. One variable is text type variable and the other one is reference type variable. Please see below: Requestor and the Approver should be the same person. I tried below onChange scrip. That doesn't work.
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
if (g_form.getValue('infoblox_host_req_txtbox_requestor_name').toString() == g_form.getValue('infoblox_host_req__ref_approver').toString()) {
alert("The requstor and the approver cannot be the same person");
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2016 07:30 AM
Hi Balaji,
Your scrip works. Thank you!
But, it only gives error message. still I can cancel error message and submit the form entering same name for approver and requestor.
I need to prevent submit the for if requestor and approver are same.
Thank you!
Dilini