Simple script to hide a Notification field based on another Field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 07:03 AM
Hi All:
This is probably very simple, but I am jut not getting it right. Basically, if the Account Type is Premium Savings as shown below, I don't want the "Requested Exception Term for Account field circled in red to show on the notification. When the Account Type is not Premium Savings, I want it to show. The script I have currently is shown below. Can someone take a look and possibly reply back with the changes i need to make please?
Current Script:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 08:16 AM
Hi Swathi,
I am calling the mail script in my notification as shown below. I know it is calling it based on the first part of the verbiage that is showing with the undefined shown above, or at least I would think it is calling it.
I beleive that this script has the line you mentioned above commented out. i actually have the first two lines commented out on the script below. Is that what you meant?
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 08:27 AM
@Annette Kitzmil yes you have to comment the starting 2 line and check backend value of Premium Savings is correct and remove else if this doesnt help try below
var acctType = current.getValue('account_type');//
if (acctType != "Premium Savings") {
template.print('<p>Requested Exception Term for Account: </p> ' +
current.getValue('requested_exception_term_for_account') + 'months');
}
Please mark this comment as Correct Answer/Helpful if it helped you.
Regards,
Swathi Sarang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2024 06:31 AM
The final script that works looks like this, but you put me on the right track and got me here. thank you Swathi.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2024 08:08 AM
@Annette Kitzmil , Great! 😊.Please accept the appropriate answer and close the thread so that it will be use full for future readers
Thanks
Swathi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 07:53 AM
Hi @Annette Kitzmil ,
if (current.getValue('sccType') != 'Premium Savings') {//update if condition like this and update field name from table
template.print('Start: ' + current.u_glide_date_time_2 + '<br />');// update your template name
}
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth Meda