- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2023 11:46 AM
Hi i was having a requirement to create a variable where type is reference and the variable dropbox contain the user list. The condition is for logged in user not able to select their name from the dropdown can anyone help me with these.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2023 12:45 PM
Hi Charan,
An onChange() client script that works on selection of the value in the reference field as below should help.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
if (g_form.getValue(' your variable name here') == g_user.userID)
alert("Employees do not need to submit this request for themselves.");
g_form.setValue('your variable name here', '');
//Type appropriate comment here, and begin script below
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2023 12:45 PM
Hi Charan,
An onChange() client script that works on selection of the value in the reference field as below should help.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
if (g_form.getValue(' your variable name here') == g_user.userID)
alert("Employees do not need to submit this request for themselves.");
g_form.setValue('your variable name here', '');
//Type appropriate comment here, and begin script below
}