Depending on the field, another field is Mandatory and Visible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2022 05:07 AM
Hi Team,
I need to get some code as per the requirement,
1) I had a choice field in custom table which had 3 choices in the choice field X,Y,Z. so when ever I select X or Y from the "Choice Field" then the "Text Field" should be appeared and when ever I select Z from the "Choice Field" then the "Text Field" should be disappeared.
2) I had a reference field with auto updated user and when we impersonate with that user, the "Text Field" should be mandatory also there will be a check box field and if the "Check Box" field is checked then the "Text Field" should be disappeared until the ticket is closed.
Please help me on this .
Thanks,
Karishma.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2022 05:20 AM
I assume you know how UI policies work? If not: check here.
If my answer helped you in any way, please then mark it as helpful. If it resolved the issue, please mark it as correct.
Mark
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2022 05:26 AM
Hi Mark Manders,
Please send the code for the requirement.
Thanks,
Karishma.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2022 05:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2022 05:31 AM
Hi Satanik,
I have written the on-change client script, but there is no luck.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
var payment = g_form.getValue('u_payment_method_verified');
if (isLoading) {
if ((pm == 'u_ach' || pm == 'u_wired') && (g_form.getValue('u_cost_accountant') == g_user.userID )) {
g_form.setVisible('u_if_not_why', true);
g_form.setMandatory('u_if_not_why', true);
} else {
g_form.setMandatory('u_if_not_why', false);
g_form.setVisible('u_if_not_why', false);
}
} else {
if ((pm == 'u_ach' || pm == 'u_wired') && (g_form.getValue('u_cost_accountant') == g_user.userID )) {
g_form.setVisible('u_if_not_why', true);
g_form.setMandatory('u_if_not_why', true);
} else {
g_form.setMandatory('u_if_not_why', false);
g_form.setVisible('u_if_not_why', false);
}
}
}