if/else Client Scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2009 07:58 AM
Here's the situation. If a user is using the self service function and is filling out something like a repair request. I have it ask a question for the model. If they choose other then another box pops open and asks for the make and model. They fill in the rest of the form and then click on submit. In the background it creates an incident. I have most of the info from the form going into work notes by using setJournalEntry. What I would like to do is this:
If the user picks "other" and types in the make and model it displays that make and model in work notes.
If the user picks a current model it displays that current model in work notes.
Here is the script I have so far but it doesn't seem to be working correctly. Any help??
if (producer.fax_model != 'producer.fax_model.Other') {
current.comments.setJournalEntry('Make and Model: ' + producer.other_name);
}
else {
current.comments.setJournalEntry('Model: ' + producer.fax_model);
}
fax_model is the list of models including other.
Other is the make and model field.
- Labels:
-
Service Catalog