What's the best way to auto populate a field dependent on another field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2014 08:41 AM
I'd like to implement something where by if a certain priority is set (e.g. P1) that the 'Major Incident' template is inserted.
So that the description and short description fields are populated with template text.
What's the best way to go about implementing this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2014 08:46 AM
Hi Nat,
You could do it in the client or server, depending on what you want to happen, do you want to overwrite any data that has already been entered? i.e. just say they write short_description then choose P1, what do you want to happen to original data?
PS #coys
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2014 09:07 AM
Thanks, I'd want it to overwrite to ensure they re-type using the template.
Any one happen to have some script coded already for this scenario?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2014 10:10 AM
I have never done this myself.. however i would think you could use an onchange client script combined with the applyTemplate command to do so... but not certain...
if that fails... then you can always set a UI policy that will set the fields for you if the value is p1... or in the client script set them through scripting.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2014 01:17 AM
If (newValue == 1){
applyTemplate(template);
}
should work in a client script onChange of priority to 1, template being the sys_id of your major incident template.
Marc