- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2024 04:47 AM
Hi All,
Need suggestions on below requirement
1. Wanted to show the reference field values "Employee name" reference table is sys_user.
2. Based on select box "Hire Type" with options "Contractor and Employee" so the requirement is if user selects Contractor hire type then in employee name field it should show only contractor users orelse employee users
In user table there is a "contractor" checkbox if its checked those are contractor users if its unchecked those users are employee
Thanks in advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2024 06:06 AM
If you always want only active users, add it to the beginning:
javascript:
var ret = 'active=true^u_is_contractor=';
if (current.variables.u_z_onboarding_hire_type == 'contractor') {
ret += 'true';
} else {
ret += 'false';
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2024 05:02 AM
Hi @Brad Bowman ,
Yes, After adding current. Variables its showing as expected in addition I'm trying to add active "true "condition as well but its showing all users including active false users.
javascript:
var ret = 'u_is_contractor=';
var active = 'active=';
if (current.variables.u_z_onboarding_hire_type == 'contractor') {
ret += 'true';
active += 'true';
} else {
ret += 'false';
active += 'false';
}
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2024 06:06 AM
If you always want only active users, add it to the beginning:
javascript:
var ret = 'active=true^u_is_contractor=';
if (current.variables.u_z_onboarding_hire_type == 'contractor') {
ret += 'true';
} else {
ret += 'false';
}