- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2017 01:24 PM
Hi guys
I have a reference table were I am for walking other field within the table.
I have one field called confidential were if checked won't send emails and acl around it.
A requirement is to have this field be editable which is fine,kind of override it
However, if I have it listed as confidential true in reference table, then change it to false on main form, it updates to false in reference table, can I be able to change true false while the actual reference table stays as oringal?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2017 07:34 AM
Just in case that is what you need, below is a client script to help you:
Type: onChange
field name: your event type field
Script:
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
//Type appropriate comment here, and begin script below
if(newValue == 'eventValue') { //change this to reflect your event value
var i = g_form.getValue('parent'); //change this to reflect your parent reference field name, which holds the sys_id to the parent record
var rec = new GlideRecord('parent_table');//change this to reflect your parent table
if(rec.get(i)) {
g_form.setValue('u_confidential', rec.u_confidential); //change the first u_confidential to the name of the field on your form and the rec.u_confidential to the other field, from which you want to take the true/false value.
}
}
}
harel
Please mark as correct or helpful based on impact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2017 01:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2017 04:39 AM
Hi Brendan,
It is possible to do with an onChange client script. Before providing one, I need to know: do you mean that if you select a specific event type, you want to check whether the parent is checked or not and either check it or not according to the parent?
harel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2017 07:34 AM
Just in case that is what you need, below is a client script to help you:
Type: onChange
field name: your event type field
Script:
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
//Type appropriate comment here, and begin script below
if(newValue == 'eventValue') { //change this to reflect your event value
var i = g_form.getValue('parent'); //change this to reflect your parent reference field name, which holds the sys_id to the parent record
var rec = new GlideRecord('parent_table');//change this to reflect your parent table
if(rec.get(i)) {
g_form.setValue('u_confidential', rec.u_confidential); //change the first u_confidential to the name of the field on your form and the rec.u_confidential to the other field, from which you want to take the true/false value.
}
}
}
harel
Please mark as correct or helpful based on impact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2017 07:48 AM
thanks harel,
Really appreciate you taking the time