- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2022 09:07 AM
Hello ALL ,
I have requirement to set visibility of "hr_acuity" checkbox if "hr_opened_for" is :
Only display if opened_for.location.category = XYZ |
I have also used this in script part:
function onCondition() {
if(g_form.getValue('hr_opened_for.location.u_category')== 'xyz') {
g_form.setVisible('hr_acuity', true);
}
}
Any help is appreciated
Regards,
Ruchi
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2022 10:14 AM
Can you write a Onchange client script on hr_opened_for field with the below code:-
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var use = g_form.getReference('hr_opened_for', callBackFunc);
}
function callBackFunc(use)
{
if(use.location.u_category=="xyz")
{
g_form.setVisible('hr_acuity','false')
}
}
Please mark my answer as correct based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2022 09:37 AM
Hello,
Can you share some screenshot of where you are trying this the form the field and all it would be easier to assist you.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2022 09:45 AM
Thanks @Saurav11
If opened for i.e "hr_opened_for" location.u_category is 'xyz' then we don't have to show "hr_acuity" option and location & category is field on user table.
basically we want to dot walk hr_opened_for.location.u_category="xyz"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2022 10:14 AM
Can you write a Onchange client script on hr_opened_for field with the below code:-
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var use = g_form.getReference('hr_opened_for', callBackFunc);
}
function callBackFunc(use)
{
if(use.location.u_category=="xyz")
{
g_form.setVisible('hr_acuity','false')
}
}
Please mark my answer as correct based on Impact.